
  ___  ____  ____  ____  ____ ®
 /__    /   ____/   /   ____/      17.0
___/   /   /___/   /   /___/       SE—Standard Edition

 Statistics and Data Science       Copyright 1985-2021 StataCorp LLC
                                   StataCorp
                                   4905 Lakeway Drive
                                   College Station, Texas 77845 USA
                                   800-STATA-PC        https://www.stata.com
                                   979-696-4600        stata@stata.com

Stata license: 100-user network perpetual
Serial number: 401706318278
  Licensed to: Luc Girardin
               

Notes:
      1. Stata is running in batch mode.
      2. Unicode is supported; see help unicode_advice.
      3. Maximum number of variables is set to 5,000; see help set_maxvar.

. do "runall.do" 

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** August 18, 2022
. **
. ** Stata master do-file
. ** 
. ** Sets file paths and runs various replication scripts
. *****************************************************************************
> ***
. 
. // This do file runs both state and dyad level scripts for the Tilly project 
> using Abramsonmax, Abramsonmax1400 and Centennia data as input
. // Each dataset are run with the following main do files:
. //   data_prep1.do
. //   data_prep_dyadic.do
. //   data_prep2.do
. //   analysis_states.do  
. //   analysis_dyads.do
. // or variations thereof.
. // These do files put various intermediate results into the respective interm
> ediate and output directories.
. 
. 
. 
. *****************************************************************************
> ***
. *****************************************************************************
> *** 
. ** ONLY EDIT THIS LINE TO SET ROOT DIR, REST DEFINED AS RELATIVE PATHS
. 
. ** Absolute path to the data, by default obtained through the current working
>  directory
. // global ROOT "~/War Did Make States/"
. global ROOT : pwd

. 
. *****************************************************************************
> ***
. ** DATA PREP AND ANALYSES: MAIN DATASET
. *****************************************************************************
> ***
. 
. ** Define relevant paths
. global INPUTDIR "."

. global INPUTFILE "AbramsonmaxClipped.csv"

. global INPUTFILED "AbramsonmaxClippedDyadic.csv"

. global INTERMEDIATEDIR "IntermediateFiles/"

. global OUTPUTDIR "Output/"

. global FIRSTYEAR "1490"

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. capture mkdir $INTERMEDIATEDIR

. capture mkdir $OUTPUTDIR

. 
. ** Data prep: State-level data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "data_prep1.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: data_prep1.do
. ** First data preparation file for state-level data
. ** Required file paths set in runall.do
. *****************************************************************************
> ***
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. 
. insheet using $INPUTFILE, clear
(157 vars, 15,018 obs)

. 
. drop if id == .
(0 observations deleted)

. drop if year == .
(0 observations deleted)

. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

. sort id year

. 
. // State-level war variable
. gen inc1 = .
(15,018 missing values generated)

. replace inc1 = 0 if incidencebrecke==0
(13,399 real changes made)

. replace inc1 = 1 if incidencebrecke>0 & incidencebrecke!=.
(943 real changes made)

. 
. // Wars during entire lifespan
. bys id: egen sumwaryears = sum(inc1)

. bys id: egen sumyears = sum(1)

. gen relwaryears = sumwaryears/sumyears

. 
. // Cumulative war years 
. bysort id (year): gen waryears = sum(inc1)

. gen lwaryears = l5.waryears
(498 missing values generated)

. 
. // State birth and death variables
. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

. 
. bys id: egen maxyear = max(year)

. bys id: egen minyear = min(year)

. 
. gen birth = 0

. replace birth = 1 if id!=. & l5.id==. 
(498 real changes made)

. gen firstbirth = 0

. replace firstbirth = 1 if birth==1 & year==minyear
(426 real changes made)

. 
. gen death = 0

. replace death = 1 if id!=. & f5.id==. & year<1790
(281 real changes made)

. gen finaldeath = 0

. replace finaldeath = 1 if year == maxyear & year<1790
(209 real changes made)

. 
. // Death history variables (not used)
. bysort id (year): gen deaths = sum(death)

. gen deaths1 = 0

. replace deaths1 = 1 if deaths > 0 & deaths != .
(1,277 real changes made)

. 
. // Duration dependence var
. btscs death year id, gen(lifeyears) nspline(3)

. rename _spline1  spline1

. rename _spline2  spline2

. rename _spline3  spline3

. 
. // log and lag of state size (area) and war variable
. gen lnarea = log(area)
(676 missing values generated)

. gen llarea = l5.lnarea
(891 missing values generated)

. gen linc1 = l5.inc1
(891 missing values generated)

. 
. // State age
. bys id (year): gen age = sum(5)

. gen llage = log(l5.age+5)
(498 missing values generated)

. 
. // Prepare cumulative variables at state level
. replace growthwarbreckearea = 0 if growthwarbreckearea == .
(13,378 real changes made)

. replace growthpeacebreckearea = 0 if growthpeacebreckearea == .
(939 real changes made)

. 
. gen lwargrowth = log(growthwarbreckearea + 1)

. gen lpeacegrowth = log(growthpeacebreckearea + 1)

. 
. gen llwargrowth = log(l5.growthwarbreckearea + 1)
(498 missing values generated)

. gen llpeacegrowth = log(l5.growthpeacebreckearea + 1)
(498 missing values generated)

. 
. gen llgrowth = log(l5.growthwarbreckearea + l5.growthpeacebreckearea + 1)
(498 missing values generated)

. 
. replace shrinkwarbreckearea = 0 if shrinkwarbreckearea == .
(13,411 real changes made)

. replace shrinkpeacebreckearea = 0 if shrinkpeacebreckearea == .
(1,313 real changes made)

. 
. gen lwarshrink = log(shrinkwarbreckearea + 1)

. gen lpeaceshrink = log(shrinkpeacebreckearea + 1)

. 
. gen llwarshrink = log(l5.shrinkwarbreckearea + 1)
(498 missing values generated)

. gen llpeaceshrink = log(l5.shrinkpeacebreckearea + 1)
(498 missing values generated)

. 
. gen llshrink = log(l5.shrinkwarbreckearea + shrinkpeacebreckearea + 1)
(498 missing values generated)

. 
. gen netwargrowth = growthwarbreckearea - shrinkwarbreckearea

. gen netpeacegrowth = growthpeacebreckearea - shrinkpeacebreckearea

. 
. 
. // Variations on gain/loss dep. variables (not all used)
. 
. replace gainarea = 0 if gainarea == .
(676 real changes made)

. replace lossarea = 0 if lossarea == .
(891 real changes made)

. 
. gen netgain = gainarea - lossarea

. 
. gen gain = netgain

. replace gain = 0 if netgain<0 & netgain!=.
(2,585 real changes made)

. 
. gen loss = 0

. replace loss = abs(netgain) if netgain<0 & netgain!=.
(2,585 real changes made)

.  
. gen loss_nd = loss

. replace loss_nd = . if death==1
(281 real changes made, 281 to missing)

. 
. gen lngain = log(gain + 1)

. gen lnloss = log(loss + 1)

. gen lnloss_nd = log(loss_nd + 1)
(281 missing values generated)

. 
. gen rloss = 0

. replace rloss = loss/l5.area
(3,476 real changes made, 891 to missing)

. 
. gen rgain = 0

. replace rgain = gain/l5.area
(3,149 real changes made, 891 to missing)

. 
. gen lnrloss = log(rloss+1)
(891 missing values generated)

. gen lnrgain = log(rgain+1)
(891 missing values generated)

. 
. gen rloss_nd = .
(15,018 missing values generated)

. replace rloss_nd = loss_nd/l5.area
(13,846 real changes made)

. gen lnrloss_nd = log(rloss_nd + 1)
(1,172 missing values generated)

. 
. gen gain1 = 0 

. replace gain1 = 1 if netgain > 0 & netgain!=.
(2,895 real changes made)

. 
. gen loss1 = 0

. replace loss1 = 1 if loss > 0 & loss!=.
(2,585 real changes made)

. 
. gen loss_nd1 = loss_nd
(281 missing values generated)

. replace loss_nd1 = 1 if loss_nd>0 
(2,585 real changes made)

. 
. 
. 
. 
. // Duration variables for state-level models
. 
. btscs gain1 year id, gen(nogainyear) nspline(3)

. rename _spline1  ngspline1

. rename _spline2  ngspline2

. rename _spline3  ngspline3

. 
. btscs loss1 year id, gen(nolossyear) nspline(3)

. rename _spline1  nlspline1

. rename _spline2  nlspline2

. rename _spline3  nlspline3

. 
. gen event = gain1

. replace event = 1 if loss1 == 1
(2,585 real changes made)

. 
. btscs event year id, gen(noeventyear) nspline(3)

. rename _spline1  evspline1

. rename _spline2  evspline2

. rename _spline3  evspline3

. 
. 
. // Urbanization variables and city state dummies (the latter not used)
. 
. gen urban = populationurban/population
(1,746 missing values generated)

. gen lurban = l5.urban
(1,943 missing values generated)

. gen citystate = .
(15,018 missing values generated)

. replace citystate = 0 if urban<=0.4 & llarea<8
(9,154 real changes made)

. replace citystate = 1 if urban>0.4 & llarea<8
(2,296 real changes made)

. 
. 
. // European centrality measures for state location
. 
. gen llcentraldist = log(l5.systemcenterdistancecentroid+1)
(891 missing values generated)

. by id (year), sort: egen lmedcentraldist = median(l5.systemcenterdistancecent
> roid)
(4 missing values generated)

. gen lcentral = 0

. replace lcentral = 1 if l5.systemcenterdistancecentroid <= lmedcentraldist
(7,162 real changes made)

. 
. 
. // Paritioning of sample into states above and below median size
. 
. bys year: egen medarea = median(lnarea) 

. gen abovemed = .
(15,018 missing values generated)

. replace abovemed = 1 if lnarea >= medarea
(7,862 real changes made)

. replace abovemed = 0 if lnarea < medarea
(7,156 real changes made)

. 
. 
. // Save intermeidate result for further processing in data_prep_dyadic and da
> ta_prep2
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. sort id year

. save "statedata_intermediate.dta", replace 
file statedata_intermediate.dta saved

. 
end of do-file

. 
. ** Data prep: Dyadic data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "data_prep_dyadic.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: data_prep_dyadic.do
. ** Data preparation file for dyad-level data
. ** Required file paths set in runall.do 
. ** (to be run after data_prep1 but before data_prep2)
. *****************************************************************************
> ***
. 
. 
. // Should be run from runall.do which contains all relevant label definitions
>  for files and directories
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INPUTDIR  
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. 
. insheet using $INPUTFILED, clear
(45 vars, 3,679,638 obs)

. 
. // Define dyad identity codes
. gen idd = ida*1000 + idb

. gen idd2 = idd

. replace idd2 = idb * 1000 + ida if idb!=. & idb < ida
(1,839,819 real changes made)

.  
. sort idd year

. 
. // Main dyadic geography variables
. gen ldist = log(mindistance+1)
(308,674 missing values generated)

. gen neigh = 0

. replace neigh = 1 if mindistance<10
(123,826 real changes made)

. 
. 
. // Merge in state level data for State A
. gen id = ida

. sort id year

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. merge m:1 id year using statedata_intermediate

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         3,679,638  (_merge==3)
    -----------------------------------------

.  drop _merge

. gen areaa = area
(154,337 missing values generated)

. gen popa = population
(417,257 missing values generated)

. gen lareaa = log(areaa)
(154,337 missing values generated)

. gen lpopa = log(popa)
(417,257 missing values generated)

. gen growthwara = growthwarbreckearea

. gen growthpeacea = growthpeacebreckearea

. gen shrinkwara = shrinkwarbreckearea

. gen shrinkpeacea = shrinkpeacebreckearea

. 
. replace elevationsd = 0 if elevationsd == .
(417,257 real changes made)

. gen elevsda = elevationsd

. gen deatha = death

. gen agea = age

. gen coastmina = coastmin
(417,257 missing values generated)

. gen lurbana = lurban
(480,276 missing values generated)

. gen llcentraldista = llcentraldist
(222,643 missing values generated)

. gen lcentrala = lcentral

. 
. drop id area population growthwarbreckearea growthpeacebreckearea shrinkwarbr
> eckearea shrinkpeacebreckearea elevationsd /// 
> death age coastmin lurban llcentraldist lcentral

. 
. // Merge in state level data for State B
. gen id = idb

. sort id year

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. merge m:1 id year using statedata_intermediate

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         3,679,638  (_merge==3)
    -----------------------------------------

.  drop _merge 

. gen areab = area
(154,337 missing values generated)

. gen popb = population
(417,257 missing values generated)

. gen lareab = log(areab)
(154,337 missing values generated)

. gen lpopb = log(popb)
(417,257 missing values generated)

. gen growthwarb = growthwarbreckearea

. gen growthpeaceb = growthpeacebreckearea

. gen shrinkwarb = shrinkwarbreckearea

. gen shrinkpeaceb = shrinkpeacebreckearea

. gen elevsdb = elevationsd
(417,257 missing values generated)

. gen deathb = death

. gen ageb = age

. gen coastminb = coastmin
(417,257 missing values generated)

. gen lurbanb = lurban
(480,276 missing values generated)

. gen llcentraldistb = llcentraldist
(222,643 missing values generated)

. gen lcentralb = lcentral

. 
. drop id area population growthwarbreckearea growthpeacebreckearea shrinkwarbr
> eckearea shrinkpeacebreckearea elevationsd ///
> death age coastmin lurban llcentraldist lcentral

. 
. // Compute cumulative dyadic vars
. // Growth vars
. xtset idd year

Panel variable: idd (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

. replace growthwara = 0 if growthwara == .
(0 real changes made)

. replace growthpeacea = 0 if growthpeacea == .
(0 real changes made)

. replace growthwarb = 0 if growthwarb == .
(0 real changes made)

. replace growthpeaceb = 0 if growthpeaceb == .
(0 real changes made)

. 
. // Shrink vars
. replace shrinkwara = 0 if shrinkwara == .
(0 real changes made)

. replace shrinkpeacea = 0 if shrinkpeacea == .
(0 real changes made)

. replace shrinkwarb = 0 if shrinkwarb == .
(0 real changes made)

. replace shrinkpeaceb = 0 if shrinkpeaceb == .
(0 real changes made)

. 
. gen llgrowthwara = log(l5.growthwara+1)
(186,662 missing values generated)

. gen llgrowthpeacea = log(l5.growthpeacea+1)
(186,662 missing values generated)

. gen llgrowthwarb = log(l5.growthwarb+1)
(186,662 missing values generated)

. gen llgrowthpeaceb = log(l5.growthpeaceb+1)
(186,662 missing values generated)

. gen llshrinkwara = log(l5.shrinkwara+1)
(186,662 missing values generated)

. gen llshrinkpeacea = log(l5.shrinkpeacea+1)
(186,662 missing values generated)

. gen llshrinkwarb = log(l5.shrinkwarb+1)
(186,662 missing values generated)

. gen llshrinkpeaceb = log(l5.shrinkpeaceb+1)
(186,662 missing values generated)

. 
. gen llgrowtha = log(l5.growthwara+l5.growthpeacea+1) 
(186,662 missing values generated)

. gen llshrinkb = log(l5.shrinkwarb+l5.shrinkpeaceb+1)
(186,662 missing values generated)

. 
. // Compute dependent variables
. // Netgain
. replace gainaarea = 0 if gainaarea == .
(369,957 real changes made)

. replace lossaarea = 0 if lossaarea == .
(369,957 real changes made)

. drop netgain

. gen netgain = .
(3,679,638 missing values generated)

. replace netgain = gainaarea - lossaarea
(3,679,638 real changes made)

. gen netgain0 = netgain

. replace netgain0 = 0 if netgain<0 & netgain!=. 
(9,529 real changes made)

. 
. gen netloss0 = abs(netgain)

. replace netloss0 = 0 if netgain>0 & netgain!=. 
(9,529 real changes made)

.  
. // DVs...
. gen lnga = log(netgain0+1)

. gen lnla = log(netloss0+1)

. //gen nga1 = 0
. //replace nga1 = 1 if netgain0 > 100
. 
.  // Revised DV with losses dyad coded as missing
.  
.  gen lnga0 = lnga

.  replace lnga0 = . if netgain < 0 
(9,529 real changes made, 9,529 to missing)

. 
.  
.  gen lnla0 = lnla

.  replace lnla0 = . if netgain > 0 
(9,529 real changes made, 9,529 to missing)

.  
. 
. /////////////////////////////////////////////////
>  
. gen lnga2 = log(abs(netgain)+1)

.  
. gen nga21 = 0

. replace nga21 = 1 if lnga2>0 & lnga2!=.
(19,058 real changes made)

.  
. gen nga2 = abs(netgain)

. 
. // Compute dummy DVs
. 
. // drop nga1
. 
. gen nga1 = 0

. replace nga1 = 1 if netgain > 0 & netgain != .
(9,529 real changes made)

. 
. gen nla1 = 0

. replace nla1 = 1 if netgain < 0 & netgain != .
(9,529 real changes made)

. 
.  drop event

. gen event = 0

. replace event = 1 if nga1==1 | nla1==1 
(19,058 real changes made)

.  drop noeventyear

. btscs  event year idd, gen(noeventyear) nspline(3)

.  drop evspline*

. rename _spline1  evspline1

. rename _spline2  evspline2

. rename _spline3  evspline3

. 
. 
. gen nga10 = nga1

. replace nga10 = . if netgain < 0 & netgain != .
(9,529 real changes made, 9,529 to missing)

. 
. gen nla10 = nla1

. replace nla10 = . if netgain > 0 & netgain != .
(9,529 real changes made, 9,529 to missing)

. 
. 
. 
. ////////////////////////////////////////////
> 
. // Conflict variables
. drop inc1

. gen inc1 = .
(3,679,638 missing values generated)

. replace inc1 = 0 if incidencebrecke == 0 
(3,677,106 real changes made)

. replace inc1 = 1 if incidencebrecke > 0  & incidencebrecke!=.
(2,532 real changes made)

. 
. 
. 
.   
. xtset idd year

Panel variable: idd (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

.  
. // Prepare vars for dyadic analysis
.  gen lneigh = l5.neigh
(186,662 missing values generated)

.  gen lldist = l5.ldist
(362,302 missing values generated)

.  gen llareaa = l5.lareaa
(274,482 missing values generated)

.  gen llareab = l5.lareab
(274,482 missing values generated)

.  
. // Set labels for output
. label variable lnga "log net terr. gain"

. label variable lneigh "neighbors"

. label variable lldist "log distance"

. label variable inc1 "conflict"

. label variable llareaa "log size A"

. label variable llareab "log size B"

. label variable llgrowthwara "log cumul. war gains A"

. label variable llgrowthpeacea "log cumul. peace gains A"

.  
.  
. 
. // Compute various relational measures aggregated to the country level
. // Used as control variables... 
.  
.  bys ida year: egen lnumneighsa = sum(lneigh)

.  gen llnumneighsa = log(lnumneighsa+1)

.  
.  bys idb year: egen lnumneighsb = sum(lneigh)

.  gen llnumneighsb = log(lnumneighsb+1)

. 
. 
.  xtset idd year

Panel variable: idd (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

.  
.  gen llelevsda = log(l5.elevsda+1)
(186,662 missing values generated)

.  gen llelevsdb = log(l5.elevsdb+1)
(528,206 missing values generated)

.  
. 
. 
.  
. 
. 
. gen llr = llareaa/log(l5.areaa + l5.areab)
(362,302 missing values generated)

. gen llrpop = l5.lpopa/log(l5.popa+l5.popb)
(838,910 missing values generated)

. gen inc1Xllr = inc1 * llr
(362,302 missing values generated)

. 
. // Save intermediate analysis data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. save dyad_analysis1, replace
(file dyad_analysis1.dta not found)
file dyad_analysis1.dta saved

. // save dyad_analysis1warlag, replace
. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////////////////////////
> // Aggregation to country level
. 
. gen dyad_wargains = inc1*netgain0

. gen dyad_peacegains = (1-inc1)*netgain0

. gen dyad_warlosses = inc1*netloss0

. gen dyad_peacelosses = (1-inc1)*netloss0

. 
. 
. collapse (sum)dyad_wargains dyad_peacegains dyad_warlosses dyad_peacelosses  
> (max) llnumneighsa lnumneighsa, by (ida year) 

. 
. xtset ida year

Panel variable: ida (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

. 
. rename ida id 

. 
. // Save country-level variables that are used in country-level analysis
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. save dyad_cumul.dta, replace
file dyad_cumul.dta saved

. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////////////////////////
> // Reload main analysis data again
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. use dyad_analysis1, clear

. // use dyad_analysis1warlag, clear
. 
. 
. // Merge in country level data for States A and B
. // drop id
. gen id = ida

. merge m:1 id year using dyad_cumul

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         3,679,638  (_merge==3)
    -----------------------------------------

. gen dyad_wargainsa = dyad_wargains

. gen dyad_peacegainsa = dyad_peacegains

. gen dyad_warlossesa = dyad_warlosses

. gen dyad_peacelossesa = dyad_peacelosses

.  drop id _merge dyad_peacegains dyad_warlosses dyad_peacelosses

. 
. 
. replace dyad_wargainsa = 0 if dyad_wargainsa == .
(0 real changes made)

. replace dyad_peacegainsa = 0 if dyad_peacegainsa == .
(0 real changes made)

. replace dyad_warlossesa = 0 if dyad_warlossesa == .
(0 real changes made)

. replace dyad_peacelossesa = 0 if dyad_peacelossesa == .
(0 real changes made)

. 
.  // drop id
. gen id = idb

. merge m:1 id year using dyad_cumul

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         3,679,638  (_merge==3)
    -----------------------------------------

. gen dyad_wargainsb = dyad_wargains

. gen dyad_peacegainsb = dyad_peacegains

. gen dyad_warlossesb = dyad_warlosses

. gen dyad_peacelossesb = dyad_peacelosses

.  drop id _merge dyad_wargains dyad_peacegains dyad_warlosses dyad_peacelosses

. 
. 
. replace dyad_wargainsb = 0 if dyad_wargainsb == .
(0 real changes made)

. replace dyad_peacegainsb = 0 if dyad_peacegainsb == .
(0 real changes made)

. replace dyad_warlossesb = 0 if dyad_warlossesb == .
(0 real changes made)

. replace dyad_peacelossesb = 0 if dyad_peacelossesb == .
(0 real changes made)

. 
. 
. 
. // Analysis data including onset etc.
. 
. gen onsetinita1 = 0

. replace onsetinita1 = 1 if  onsetinitiatorabrecke > 0 & onsetinitiatorabrecke
>  !=.
(471 real changes made)

. 
. btscs onsetinita1 year idd, gen(pyis) nspline(3)

. rename _spline1  pyispline1

. rename _spline2  pyispline2

. rename _spline3  pyispline3

. 
. 
. 
. gen incinita1 = 0

. replace incinita1 = 1 if inc1==1 & incidenceinitiatorabrecke > 0 & incidencei
> nitiatorabrecke !=.
(812 real changes made)

. 
. gen incinitsidea1 = incinita1

. replace incinitsidea1 = 1 if incidencefollowerabrecke > 0 & incidencefollower
> abrecke !=.
(1,537 real changes made)

. 
. gen incattackedb1 = 0

. replace incattackedb1 = 1 if incidencebrecke>0 & incidenceinitiatorbbrecke==0
>  & incidencefollowerbbrecke==0
(1,073 real changes made)

. 
. gen inc1Xgrowthwara = inc1 * llgrowthwara
(186,662 missing values generated)

. gen inc1Xgrowthpeacea = inc1 * llgrowthpeacea
(186,662 missing values generated)

. gen inc1Xshrinkwarb = inc1 * llshrinkwarb
(186,662 missing values generated)

. gen inc1Xshrinkpeaceb = inc1 * llshrinkpeaceb
(186,662 missing values generated)

. 
. 
. gen llagea = log(l5.agea*5+5)
(186,662 missing values generated)

. gen llageb = log(l5.ageb*5+5)
(186,662 missing values generated)

. gen llcoastdista = log(l5.coastmina+1)
(528,206 missing values generated)

. gen llcoastdistb = log(l5.coastminb+1)
(528,206 missing values generated)

. gen lcoastala = 0

. replace lcoastala = 1 if coastmina < 10
(476,272 real changes made)

. gen lcoastalb = 0

. replace lcoastalb = 1 if coastminb < 10
(476,272 real changes made)

. 
. gen lr = l5.areaa/(l5.areaa+l5.areab)
(362,302 missing values generated)

. gen lrwar = l5.growthwara / (l5.growthwara + l5.growthwarb)
(3,224,646 missing values generated)

. gen lrpeace = l5.growthpeacea / (l5.growthpeacea + l5.growthpeaceb)
(1,482,836 missing values generated)

. 
. // Save main analysis data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. save dyad_analysis2, replace 
file dyad_analysis2.dta saved

. 
. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////////////////////////
> // Again aggregate analysis data to country level
. 
. collapse (max)dyad_* /*(max)lr*nb*/, by (ida year)

. rename ida id

. save cumulneigh, replace
file cumulneigh.dta saved

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. use dyad_analysis2, clear

. 
.  
.  erase dyad_analysis1.dta

. 
end of do-file

. 
. ** Data prep: State-level data again
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "data_prep2.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: data_prep1.do
. ** Second data preparation file for state-level data
. ** Required file paths set in runall.do
. *****************************************************************************
> ***
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. use "statedata_intermediate.dta", clear 

. 
. 
. merge 1:1 id year using dyad_cumul

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            15,018  (_merge==3)
    -----------------------------------------

. drop _merge

. 
. merge 1:1 id year using cumulneigh

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            15,018  (_merge==3)
    -----------------------------------------

. drop _merge

. 
. 
. ** Remove phantom years
. // "Phantom years are those preceding or succeding the lifespan of a state"
. // They are used to compute size changes etc. but should not be used in analy
> sis
. drop if willborn == "true"
(374 observations deleted)

. drop if hasdied == "true"
(302 observations deleted)

. 
. // Compute new version of death variables
. drop death finaldeath deaths deaths1 lifeyears spline*

. gen death = 0

. replace death = 1 if id!=. & f5.id==. & year<1790
(422 real changes made)

. gen finaldeath = 0

. replace finaldeath = 1 if year == maxyear & year<1790
(0 real changes made)

. 
. // Compute death history variables
. bysort id (year): gen deaths = sum(death)

. gen deaths1 = 0

. replace deaths1 = 1 if deaths > 0 & deaths != .
(3,045 real changes made)

. 
. // Duration dependence for lifespan of state
. btscs death year id, gen(lifeyears) nspline(3)

. rename _spline1  spline1

. rename _spline2  spline2

. rename _spline3  spline3

. 
. 
. // Compute variables for regression analysis
. 
. gen warXsize = inc1*llarea
(637 missing values generated)

. 
. gen warXwargrowth = inc1*llwargrowth
(263 missing values generated)

. 
. gen warXpeacegrowth = inc1*llpeacegrowth
(263 missing values generated)

. 
. gen warXwarshrink = inc1*llwarshrink
(263 missing values generated)

. gen warXpeaceshrink = inc1*llpeaceshrink
(263 missing values generated)

. 
. gen peaceXwargrowth = (1-inc1)*llwargrowth
(263 missing values generated)

. gen peaceXpeacegrowth = (1-inc1)*llpeacegrowth
(263 missing values generated)

. gen peaceXwarshrink = (1-inc1)*llwarshrink
(263 missing values generated)

. gen peaceXpeaceshrink = (1-inc1)*llpeaceshrink
(263 missing values generated)

. 
. 
. gen onsetinit1 = 0 

. replace onsetinit1 = 1 if onsetinitiatorbrecke>0 & onsetinitiatorbrecke!=.
(329 real changes made)

. 
. // compute various duration dep. vars. (not all used)
. btscs onsetinit1 year id, gen(pys) nspline(3)

. rename _spline1  pyspline1

. rename _spline2  pyspline2

. rename _spline3  pyspline3

. 
. gen onsetinitside1 = onsetinit1

. replace onsetinitside1 = 1 if onsetfollowerbrecke == 1
(67 real changes made)

. 
. btscs onsetinitside1 year id, gen(pys2) nspline(3)

. rename _spline1  pys2pline1

. rename _spline2  pys2pline2

. rename _spline3  pys2pline3

. 
. gen incinit1 = 0

. replace incinit1 = 1 if inc1>0 & incidenceinitiatorbrecke > 0 & incidenceinit
> iatorbrecke !=.
(551 real changes made)

. 
. gen incinitside1 = incinit1

. replace incinitside1 = 1 if incidencefollowerbrecke > 0 & incidencefollowerbr
> ecke !=.
(154 real changes made)

. 
. gen attacked1 = 0

. replace attacked1 = 1 if onsetbrecke>0 & onsetinit1==0 & onsetinitside1==0
(192 real changes made)

. 
. btscs attacked1 year id, gen(pyas) nspline(3)

. rename _spline1  pyaspline1

. rename _spline2  pyaspline2

. rename _spline3  pyaspline3

. 
. gen incattacked1 = 0

. replace incattacked1 = 1 if incidencebrecke>0 & incinit1==0 & incinitside1==0
(238 real changes made)

. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////
> // cumulative counters for number of war years
. 
. bys id (year): gen warsum1 = sum(inc1)

. gen lwarsum1 = l5.warsum1
(637 missing values generated)

. gen llwarsum1 = log(lwarsum1+1)
(637 missing values generated)

. bys id (year): gen warsum = sum(incidencebrecke)

. gen lwarsum = l5.warsum
(637 missing values generated)

. gen llwarsum = log(lwarsum+1)
(637 missing values generated)

. 
. bys id (year): gen onsetinitsum = sum(onsetinit1)

. gen lonsetinitsum = l5.onsetinitsum
(637 missing values generated)

. gen llonsetinitsum = log(lonsetinitsum + 1)
(637 missing values generated)

. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////
> /*
> gen lldwin_wargains = log(dwin_wargains+1)
> gen lldwin_warlosses = log(dwin_warlosses+1)
> gen lldwin_peacegains = log(dwin_peacegains+1)
> gen lldwin_peacelosses = log(dwin_peacelosses+1)
> 
> gen dwin_netwargains = dwin_wargains-dwin_warlosses
> replace dwin_netwargains = 0 if dwin_netwargains<0
> gen lldwin_netwargains = log(dwin_netwargains+1)
> gen dwin_netwarlosses = dwin_warlosses-dwin_wargains
> replace dwin_netwarlosses = 0 if dwin_netwarlosses<0
> gen lldwin_netwarlosses = log(dwin_netwarlosses+1)
> 
> gen dwin_netpeacegains = dwin_peacegains-dwin_peacelosses
> replace dwin_netpeacegains = 0 if dwin_netpeacegains<0
> gen lldwin_netpeacegains = log(dwin_netpeacegains+1)
> gen dwin_netpeacelosses = dwin_peacelosses-dwin_peacegains
> replace dwin_netpeacelosses = 0 if dwin_netpeacelosses<0
> gen lldwin_netpeacelosses = log(dwin_netpeacelosses+1)
> 
> 
> bys year: egen warring = sum(inc1)
> */
. 
. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

. gen llcoastdist = log(l5.coastmin + 1)
(1,670 missing values generated)

. gen lcoastal = 0

. replace lcoastal = 1 if l5.coastmin < 10
(1,831 real changes made)

. 
. *gen lwarring = l5.warring
. *gen lsharewarring = (l5.warring/l5.n)
. replace elevationsd = 0 if elevationsd == . 
(1,070 real changes made)

. 
. gen llelevsd = log(1 + l5.elevationsd)
(637 missing values generated)

. 
. 
. // All main datasets have been prepared for analysis
. // We are now ready to run analysis do-files
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. save "statedata.dta", replace 
file statedata.dta saved

. 
end of do-file

. 
. ** Analysis: State-level
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "analysis_states.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: analysis_dyads.do
. ** Main script for dyadic analysis
. ** Required file paths set in runall.do
. *****************************************************************************
> ***
. 
. // Requires that dyad_prep_dyadic is run first such that dyad_cumul.dta and c
> umulneigh.dta intermediate files are ready to be merged in from the intermedi
> ate file directory
. 
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. use "statedata.dta", clear 

. 
. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

. 
. bys year: egen n=count(area)

. bys year: egen sumarea=sum(area)

. bys year: egen marea=mean(area)

. 
. bys year: egen minarea=min(area)

. bys year: egen maxarea=max(area)

. 
. bys year: egen rank = rank(-area)

. gen pr = rank/(n+1)

. gen lnpr = log(pr)

. 
. 
. //////////////////////////////
> 
. 
. // Compute frac measures and lognormal parameters
. gen s = area/sumarea

. 
. bys year: egen sumpop = sum(population)

. 
. bys year: egen tconc = sum(s^2)

. gen tfrac = 1 - tconc

. 
. bys year: egen sumpop2 = sum((population/sumpop)^2)

. gen pfrac = 1 - sumpop2

. 
. bys year: egen sumlnarea = sum(lnarea)  

. gen muhat = sumlnarea/n

. 
. gen lnrarea = lnarea/sumlnarea

. bys year: egen lntconc = sum(lnrarea*lnrarea)

. 
. 
. bys year: egen mlnarea = mean(lnarea)

. 
. bys year: egen sumsqdiff = sum((lnarea - muhat)^2) 

. gen s2hat = sumsqdiff/n

. gen shat = sqrt(s2hat)

. 
. 
. sort year rank

. list name area lnarea rank pr n muhat shat if year==1500 & rank<11, noobs

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |           Muscovy |  1644688 | 14.31306 |    1 | .0039216 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |           Denmark |  1070379 | 13.88352 |    2 | .0078431 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |         Lithuania |  1025115 | 13.84031 |    3 | .0117647 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |   Ottoman Emirate | 779068.7 | 13.56585 |    4 | .0156863 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |             Spain | 532584.6 |  13.1855 |    5 | .0196078 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |            France |   467979 | 13.05618 |    6 | .0235294 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |           Hungary | 460673.2 | 13.04044 |    7 |  .027451 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  | Astrakhan Khanate | 351505.1 | 12.76998 |    8 | .0313726 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |           Mongols | 341820.9 | 12.74204 |    9 | .0352941 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

  +-----------------------------------------------------------------+
  |              name |     area |   lnarea | rank |       pr |   n |
  |     Kazan Khanate | 227320.3 | 12.33412 |   10 | .0392157 | 254 |
  |-----------------------------------------------------------------|
  |               muhat            |                shat            |
  |            6.530904            |            2.522089            |
  +-----------------------------------------------------------------+

. list name area lnarea rank pr n muhat shat if year==1790 & rank<11, noobs

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |         Muscovy |  4280995 |  15.2697 |    1 | .0046296 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |       Habsburgs | 733219.1 |  13.5052 |    2 | .0092593 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |          Sweden | 691007.9 | 13.44591 |    3 | .0138889 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |          Poland | 539117.9 | 13.19769 |    4 | .0185185 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |          France |   523823 | 13.16891 |    5 | .0231481 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |           Spain | 498880.7 | 13.12012 |    6 | .0277778 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  | Ottoman Emirate | 411519.4 | 12.92761 |    7 | .0324074 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |         Denmark | 342622.6 | 12.74438 |    8 |  .037037 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |         England | 292024.9 | 12.58459 |    9 | .0416667 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

  +--------------------------------------------------------------------------+
  |            name |     area |   lnarea | rank |       pr |   n |    muhat |
  |    Hohenzollern | 192791.7 | 12.16937 |   10 | .0462963 | 215 | 6.180485 |
  |--------------------------------------------------------------------------|
  |                                    shat                                  |
  |                                 2.51933                                  |
  +--------------------------------------------------------------------------+

. 
. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1490 to 1790, but with gaps
         Delta: 1 unit

. sort id year

. 
. // define labels for regression output
. 
. label variable incinit1 "initiator"

. label variable incattacked1 "target"

. label variable inc1 "war"

. label variable warXsize "war X state size"

. label variable lngain "log gain"

. label variable lnloss "log loss"

. label variable lnloss_nd "log loss (nd)"

. label variable llnumneighsa "num. neighbors"

. // label variable llrthreata "neigh. threat "
. label variable llarea "log state size"

. label variable llage "log state age"

. label variable llelevsd "log elev. SD"

. label variable lcoastal "coastal access"

. label variable llwargrowth "log cumul. war gains"

. label variable llpeacegrowth "log cumul. peace gains"

. label variable llwarshrink "log cumul. war losses"

. label variable llpeaceshrink "log cumul. peace losses"

. label variable warXwargrowth "war X cumul. war gains"

. label variable warXpeacegrowth "war X cumul. peace gains"

. label variable warXwarshrink "war X cumul. war losses"

. label variable warXpeaceshrink "war X cumul. peace losses"

. label variable peaceXwargrowth "peace X cumul. war gains"

. label variable peaceXpeacegrowth "peace X cumul. peace gains"

. label variable peaceXwarshrink "peace X cumul. war losses"

. label variable peaceXpeaceshrink "peace X cumul. peace losses"

. label variable lcentral "core"

. label variable lurban "urbanization"

. 
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. 
.         
.         
. // GENERATE TABLE 1: GROWTH AND LOSSES
. 
. eststo clear

. global X1 "warXwargrowth peaceXwargrowth warXpeacegrowth peaceXpeacegrowth"

. global X2 "warXwarshrink peaceXwarshrink warXpeaceshrink peaceXpeaceshrink"

. global X1P "inc1##c.llwargrowth inc1##c.llpeacegrowth"

. global X2P "inc1##c.llwarshrink inc1##c.llpeaceshrink"

. global CONTROLS " llage lcoastal llnumneighsa llelevsd"

. global CONTROLS2 "lcentral lurban"

. global TIMEVARS1 "nogainyear ngspline*"

. global TIMEVARS2 "nolossyear nlspline*"

. 
. reghdfe lngain  inc1 warXsize  llarea $CONTROLS $TIMEVARS1, absorb(year) clus
> ter(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(  11,    395) =     131.96
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3026
                                                  Adj R-squared   =     0.2990
                                                  Within R-sq.    =     0.2962
Number of clusters (id)      =        396         Root MSE        =     1.4175

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -1.912155   .6191734    -3.09   0.002    -3.129442   -.6948678
    warXsize |   .3057408   .0577417     5.29   0.000     .1922213    .4192603
      llarea |   .1832528   .0222542     8.23   0.000     .1395014    .2270042
       llage |   .0499272   .0351231     1.42   0.156    -.0191244    .1189787
    lcoastal |   .2604616   .1014579     2.57   0.011     .0609965    .4599266
llnumneighsa |    .098693   .0480183     2.06   0.041     .0042896    .1930963
    llelevsd |  -.0472529   .0130564    -3.62   0.000    -.0729217   -.0215842
  nogainyear |   .0518607   .0091007     5.70   0.000     .0339688    .0697526
   ngspline1 |   .0004114   .0000545     7.55   0.000     .0003043    .0005184
   ngspline2 |  -.0001161   .0000147    -7.88   0.000    -.0001451   -.0000871
   ngspline3 |   3.59e-06   3.67e-07     9.77   0.000     2.86e-06    4.31e-06
       _cons |  -.9242267    .189066    -4.89   0.000    -1.295928   -.5525253
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estimates store m1

. 
. reghdfe lngain  inc1 $X1 llarea $CONTROLS $TIMEVARS1, absorb(year) cluster(id
> )
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(  14,    395) =     108.86
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3063
                                                  Adj R-squared   =     0.3026
                                                  Within R-sq.    =     0.3000
Number of clusters (id)      =        396         Root MSE        =     1.4138

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .9909771    .258016     3.84   0.000     .4837208    1.498233
warXwargro~h |   .1650837   .0424627     3.89   0.000     .0816025    .2485649
peaceXwarg~h |   .0148926   .0214301     0.69   0.488    -.0272387    .0570238
warXpeaceg~h |  -.0087093   .0477262    -0.18   0.855    -.1025385    .0851198
peaceXpeac~h |    .061403   .0140348     4.38   0.000     .0338108    .0889952
      llarea |   .1500091   .0225563     6.65   0.000     .1056638    .1943545
       llage |   -.004343   .0299595    -0.14   0.885    -.0632431    .0545571
    lcoastal |   .1981481   .0928361     2.13   0.033     .0156335    .3806628
llnumneighsa |   .0684285   .0435305     1.57   0.117     -.017152     .154009
    llelevsd |  -.0428114   .0131459    -3.26   0.001    -.0686561   -.0169668
  nogainyear |   .0575984     .00912     6.32   0.000     .0396685    .0755282
   ngspline1 |   .0004288   .0000546     7.86   0.000     .0003215    .0005361
   ngspline2 |    -.00012   .0000148    -8.12   0.000    -.0001491    -.000091
   ngspline3 |   3.49e-06   3.79e-07     9.19   0.000     2.74e-06    4.23e-06
       _cons |  -.5867694   .1522821    -3.85   0.000    -.8861542   -.2873847
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. reghdfe lngain  inc1 $X1 llarea $CONTROLS $TIMEVARS1, absorb(year) cluster(id
> )
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(  14,    395) =     108.86
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3063
                                                  Adj R-squared   =     0.3026
                                                  Within R-sq.    =     0.3000
Number of clusters (id)      =        396         Root MSE        =     1.4138

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .9909771    .258016     3.84   0.000     .4837208    1.498233
warXwargro~h |   .1650837   .0424627     3.89   0.000     .0816025    .2485649
peaceXwarg~h |   .0148926   .0214301     0.69   0.488    -.0272387    .0570238
warXpeaceg~h |  -.0087093   .0477262    -0.18   0.855    -.1025385    .0851198
peaceXpeac~h |    .061403   .0140348     4.38   0.000     .0338108    .0889952
      llarea |   .1500091   .0225563     6.65   0.000     .1056638    .1943545
       llage |   -.004343   .0299595    -0.14   0.885    -.0632431    .0545571
    lcoastal |   .1981481   .0928361     2.13   0.033     .0156335    .3806628
llnumneighsa |   .0684285   .0435305     1.57   0.117     -.017152     .154009
    llelevsd |  -.0428114   .0131459    -3.26   0.001    -.0686561   -.0169668
  nogainyear |   .0575984     .00912     6.32   0.000     .0396685    .0755282
   ngspline1 |   .0004288   .0000546     7.86   0.000     .0003215    .0005361
   ngspline2 |    -.00012   .0000148    -8.12   0.000    -.0001491    -.000091
   ngspline3 |   3.49e-06   3.79e-07     9.19   0.000     2.74e-06    4.23e-06
       _cons |  -.5867694   .1522821    -3.85   0.000    -.8861542   -.2873847
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estimates store m2

. 
. reghdfe lngain  inc1 $X1  llarea $CONTROLS $TIMEVARS1, absorb(year id) cluste
> r(id)
(dropped 19 singleton observations)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =     13,686
Absorbing 2 HDFE groups                           F(  14,    376) =      16.30
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3613
                                                  Adj R-squared   =     0.3395
                                                  Within R-sq.    =     0.0259
Number of clusters (id)      =        377         Root MSE        =     1.3754

                                   (Std. err. adjusted for 377 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .6501142   .2306061     2.82   0.005      .196675    1.103554
warXwargro~h |   .0537091   .0489269     1.10   0.273    -.0424955    .1499137
peaceXwarg~h |  -.1228876   .0417981    -2.94   0.003    -.2050749   -.0407004
warXpeaceg~h |  -.0919424   .0484521    -1.90   0.059    -.1872134    .0033286
peaceXpeac~h |   .0037523   .0241766     0.16   0.877     -.043786    .0512906
      llarea |  -.3637186   .1751892    -2.08   0.039    -.7081918   -.0192453
       llage |   .1403747   .0843243     1.66   0.097    -.0254315     .306181
    lcoastal |   .5988109   .5645422     1.06   0.290    -.5112446    1.708866
llnumneighsa |  -.2755956   .1442068    -1.91   0.057    -.5591485    .0079574
    llelevsd |   .0546108   .1222472     0.45   0.655    -.1857631    .2949847
  nogainyear |   .0663262   .0086325     7.68   0.000     .0493522    .0833002
   ngspline1 |   .0004312   .0000506     8.52   0.000     .0003317    .0005307
   ngspline2 |  -.0001177   .0000137    -8.60   0.000    -.0001445   -.0000908
   ngspline3 |   2.64e-06   3.47e-07     7.62   0.000     1.96e-06    3.32e-06
       _cons |   2.385447   .8338468     2.86   0.004     .7458595    4.025034
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
          id |       377         377           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. reghdfe lngain  inc1 $X1  llarea $CONTROLS $TIMEVARS1, absorb(year id) cluste
> r(id)
(dropped 19 singleton observations)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =     13,686
Absorbing 2 HDFE groups                           F(  14,    376) =      16.30
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3613
                                                  Adj R-squared   =     0.3395
                                                  Within R-sq.    =     0.0259
Number of clusters (id)      =        377         Root MSE        =     1.3754

                                   (Std. err. adjusted for 377 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .6501142   .2306061     2.82   0.005      .196675    1.103554
warXwargro~h |   .0537091   .0489269     1.10   0.273    -.0424955    .1499137
peaceXwarg~h |  -.1228876   .0417981    -2.94   0.003    -.2050749   -.0407004
warXpeaceg~h |  -.0919424   .0484521    -1.90   0.059    -.1872134    .0033286
peaceXpeac~h |   .0037523   .0241766     0.16   0.877     -.043786    .0512906
      llarea |  -.3637186   .1751892    -2.08   0.039    -.7081918   -.0192453
       llage |   .1403747   .0843243     1.66   0.097    -.0254315     .306181
    lcoastal |   .5988109   .5645422     1.06   0.290    -.5112446    1.708866
llnumneighsa |  -.2755956   .1442068    -1.91   0.057    -.5591485    .0079574
    llelevsd |   .0546108   .1222472     0.45   0.655    -.1857631    .2949847
  nogainyear |   .0663262   .0086325     7.68   0.000     .0493522    .0833002
   ngspline1 |   .0004312   .0000506     8.52   0.000     .0003317    .0005307
   ngspline2 |  -.0001177   .0000137    -8.60   0.000    -.0001445   -.0000908
   ngspline3 |   2.64e-06   3.47e-07     7.62   0.000     1.96e-06    3.32e-06
       _cons |   2.385447   .8338468     2.86   0.004     .7458595    4.025034
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
          id |       377         377           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "Yes"

added macro:
            e(statefe) : "Yes"

. estimates store m3

. 
. reghdfe lnloss  inc1 warXsize  llarea $CONTROLS $TIMEVARS2, absorb(year) clus
> ter(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(  11,    395) =     104.89
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2615
                                                  Adj R-squared   =     0.2577
                                                  Within R-sq.    =     0.2538
Number of clusters (id)      =        396         Root MSE        =     1.3477

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lnloss | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -1.064155   .5027343    -2.12   0.035    -2.052525   -.0757859
    warXsize |    .167415   .0522744     3.20   0.001     .0646441    .2701859
      llarea |   .1872933   .0383907     4.88   0.000     .1118177    .2627689
       llage |   .1167292   .0306842     3.80   0.000     .0564045    .1770539
    lcoastal |   .3235272    .121837     2.66   0.008     .0839971    .5630572
llnumneighsa |    .135447   .0574309     2.36   0.019     .0225386    .2483555
    llelevsd |  -.0553436   .0212493    -2.60   0.010    -.0971196   -.0135677
  nolossyear |   .0522042   .0097853     5.33   0.000     .0329664     .071442
   nlspline1 |   .0004062   .0000585     6.94   0.000     .0002912    .0005212
   nlspline2 |  -.0001135   .0000158    -7.19   0.000    -.0001445   -.0000824
   nlspline3 |   3.05e-06   3.58e-07     8.50   0.000     2.34e-06    3.75e-06
       _cons |  -1.313005   .2312506    -5.68   0.000    -1.767641   -.8583689
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estimates store m4

. 
. reghdfe lnloss  inc1 $X2 llarea $CONTROLS $TIMEVARS2, absorb(year) cluster(id
> )
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(  14,    395) =     125.65
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2622
                                                  Adj R-squared   =     0.2582
                                                  Within R-sq.    =     0.2546
Number of clusters (id)      =        396         Root MSE        =     1.3471

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lnloss | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .7510059   .2511596     2.99   0.003     .2572291    1.244783
warXwarshr~k |   .0341764   .0306671     1.11   0.266    -.0261147    .0944676
peaceXwars~k |   .0172737   .0318374     0.54   0.588    -.0453183    .0798657
warXpeaces~k |   .0404822   .0643105     0.63   0.529    -.0859514    .1669158
peaceXpeac~k |   .0594606    .018244     3.26   0.001     .0235931    .0953281
      llarea |   .1868566   .0300485     6.22   0.000     .1277816    .2459316
       llage |   .0796011   .0283971     2.80   0.005     .0237728    .1354295
    lcoastal |    .238374   .1088714     2.19   0.029     .0243341     .452414
llnumneighsa |   .1012231   .0524079     1.93   0.054    -.0018103    .2042564
    llelevsd |  -.0622476   .0167582    -3.71   0.000     -.095194   -.0293013
  nolossyear |   .0610766   .0095036     6.43   0.000     .0423926    .0797607
   nlspline1 |   .0004312   .0000566     7.62   0.000     .0003199    .0005424
   nlspline2 |  -.0001188   .0000153    -7.76   0.000    -.0001489   -.0000887
   nlspline3 |   2.83e-06   3.69e-07     7.67   0.000     2.10e-06    3.55e-06
       _cons |  -1.219139   .1956262    -6.23   0.000    -1.603738   -.8345408
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estimates store m5

. 
. reghdfe lnloss  inc1 $X2 llarea $CONTROLS $TIMEVARS2, absorb(year id) cluster
> (id)
(dropped 19 singleton observations)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =     13,686
Absorbing 2 HDFE groups                           F(  14,    376) =      11.04
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3163
                                                  Adj R-squared   =     0.2931
                                                  Within R-sq.    =     0.0351
Number of clusters (id)      =        377         Root MSE        =     1.3156

                                   (Std. err. adjusted for 377 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lnloss | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .4287418   .2775188     1.54   0.123    -.1169414    .9744251
warXwarshr~k |   .0033143   .0337005     0.10   0.922    -.0629507    .0695794
peaceXwars~k |  -.0572241   .0494479    -1.16   0.248    -.1544533     .040005
warXpeaces~k |  -.0674171   .0709322    -0.95   0.342    -.2068906    .0720564
peaceXpeac~k |  -.0412236   .0262187    -1.57   0.117    -.0927773    .0103302
      llarea |   .5372072   .1238344     4.34   0.000     .2937123     .780702
       llage |   .2773417   .0862017     3.22   0.001     .1078439    .4468395
    lcoastal |  -.5538396   .5035498    -1.10   0.272    -1.543966     .436287
llnumneighsa |   .4971741    .182877     2.72   0.007     .1375842    .8567639
    llelevsd |  -.1271987    .082871    -1.53   0.126    -.2901473      .03575
  nolossyear |    .069886   .0096863     7.21   0.000     .0508398    .0889321
   nlspline1 |   .0004442   .0000593     7.49   0.000     .0003276    .0005607
   nlspline2 |  -.0001196   .0000161    -7.44   0.000    -.0001512    -.000088
   nlspline3 |   2.13e-06   3.96e-07     5.38   0.000     1.35e-06    2.91e-06
       _cons |  -4.707449   .8167174    -5.76   0.000    -6.313355   -3.101543
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
          id |       377         377           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "Yes"

added macro:
            e(statefe) : "Yes"

. estimates store m6

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. esttab m1 m2 m3 m4 m5 m6 using "statelevel.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast  depvars ///
> title("Territorial change \label{tab:country}") ///
> order (inc1 warXsize llarea $X1 $X2) /// $CONTROLS) ///
> keep (inc1 warXsize llarea $X1 $X2) /// $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states in parentheses." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "statefe State FE"
> )
(output written to statelevel.tex)

.         
. 
. // GENERATE FIGURE 9a,b
. // INTERACTION PLOTS 
. 
. global PLOTOPTS "recast(line) recastci(rarea) title("") legend(order(1 "Peace
> " 2 "War")) plot1opts(lcolor(black) lpattern(dash)) plot2opts(lcolor(black)) 
>  ci1opts(color("102 205 0%50")) ci2opts(fcolor(red%80)) graphregion(color(whi
> te)) bgcolor(white)"

. 
. // GENERATE FIGURE 9a
. reghdfe lngain  inc1##c.llarea $CONTROLS, absorb(year) cluster(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(   7,    395) =     125.67
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2890
                                                  Adj R-squared   =     0.2856
                                                  Within R-sq.    =     0.2826
Number of clusters (id)      =        396         Root MSE        =     1.4310

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |  -1.680772   .6290747    -2.67   0.008    -2.917525   -.4440185
      llarea |   .2243792   .0212822    10.54   0.000     .1825387    .2662198
             |
        inc1#|
    c.llarea |
          1  |   .2794949   .0582812     4.80   0.000     .1649147    .3940752
             |
       llage |  -.0254252   .0342235    -0.74   0.458    -.0927081    .0418577
    lcoastal |   .2824941   .1113506     2.54   0.012       .06358    .5014081
llnumneighsa |    .098042   .0495741     1.98   0.049       .00058    .1955041
    llelevsd |  -.0453183   .0142038    -3.19   0.002    -.0732427   -.0173938
       _cons |  -.9282848   .1899084    -4.89   0.000    -1.301642   -.5549272
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. margins inc1, at (llarea = (3(1)15) llnumneighsa=2  llarea=6.3 llage=4.6 llel
> evsd=3.3 lcoastal=1)

Adjusted predictions                                    Number of obs = 13,705
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llarea       =   3
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
2._at:  llarea       =   4
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
3._at:  llarea       =   5
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
4._at:  llarea       =   6
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
5._at:  llarea       =   7
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
6._at:  llarea       =   8
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
7._at:  llarea       =   9
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
8._at:  llarea       =  10
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
9._at:  llarea       =  11
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
10._at: llarea       =  12
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
11._at: llarea       =  13
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
12._at: llarea       =  14
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
13._at: llarea       =  15
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
14._at: llarea       = 6.3
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |  -.0430752    .141059    -0.31   0.760    -.3195458    .2333954
        1 1  |  -.8853621   .4806603    -1.84   0.065    -1.827439    .0567148
        2 0  |    .181304   .1269193     1.43   0.153    -.0674533    .4300614
        2 1  |  -.3814879   .4277515    -0.89   0.372    -1.219865    .4568896
        3 0  |   .4056832   .1150011     3.53   0.000     .1802852    .6310813
        3 1  |   .1223862   .3755869     0.33   0.745    -.6137506     .858523
        4 0  |   .6300624   .1060559     5.94   0.000     .4221966    .8379282
        4 1  |   .6262604   .3245255     1.93   0.054     -.009798    1.262319
        5 0  |   .8544416   .1008778     8.47   0.000     .6567248    1.052158
        5 1  |   1.130135   .2751823     4.11   0.000     .5907871    1.669482
        6 0  |   1.078821   .1000533    10.78   0.000       .88272    1.274922
        6 1  |   1.634009    .228672     7.15   0.000      1.18582    2.082198
        7 0  |     1.3032   .1036863    12.57   0.000     1.099979    1.506422
        7 1  |   2.137883   .1871194    11.43   0.000     1.771136     2.50463
        8 0  |   1.527579   .1113414    13.72   0.000     1.309354    1.745804
        8 1  |   2.641757   .1545755    17.09   0.000     2.338794    2.944719
        9 0  |   1.751958   .1222654    14.33   0.000     1.512323    1.991594
        9 1  |   3.145631   .1375888    22.86   0.000     2.875962      3.4153
       10 0  |   1.976338    .135671    14.57   0.000     1.710427    2.242248
       10 1  |   3.649505   .1418622    25.73   0.000      3.37146     3.92755
       11 0  |   2.200717   .1508982    14.58   0.000     1.904962    2.496472
       11 1  |   4.153379   .1657597    25.06   0.000     3.828496    4.478262
       12 0  |   2.425096   .1674509    14.48   0.000     2.096898    2.753294
       12 1  |   4.657254    .202447    23.00   0.000     4.260465    5.054042
       13 0  |   2.649475   .1849735    14.32   0.000     2.286934    3.012017
       13 1  |   5.161128   .2462732    20.96   0.000     4.678441    5.643814
       14 0  |   .6973762   .1040735     6.70   0.000      .493396    .9013565
       14 1  |   .7774227   .3095042     2.51   0.012     .1708056     1.38404
------------------------------------------------------------------------------

. marginsplot, xlab(3(1)15) $PLOTOPTS

Variables that uniquely identify margins: llarea inc1

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. graph export country_area.png, replace
file country_area.png written in PNG format

. 
. // GENERATE FIGURE 9b
. reghdfe lngain  $X1P llarea $CONTROLS, absorb(year) cluster(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(  10,    395) =     105.93
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2959
                                                  Adj R-squared   =     0.2923
                                                  Within R-sq.    =     0.2895
Number of clusters (id)      =        396         Root MSE        =     1.4242

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |   .9992209    .262895     3.80   0.000     .4823725    1.516069
 llwargrowth |   .0082842   .0216197     0.38   0.702    -.0342199    .0507883
             |
        inc1#|
          c. |
 llwargrowth |
          1  |   .1476689   .0490325     3.01   0.003     .0512716    .2440662
             |
llpeacegro~h |   .0817207   .0134257     6.09   0.000      .055326    .1081154
             |
        inc1#|
          c. |
llpeacegro~h |
          1  |   -.074912   .0493455    -1.52   0.130    -.1719246    .0221006
             |
      llarea |   .1640056   .0226736     7.23   0.000     .1194297    .2085816
       llage |  -.0640483   .0271663    -2.36   0.019    -.1174568   -.0106397
    lcoastal |   .2066896   .0986489     2.10   0.037      .012747    .4006321
llnumneighsa |   .0609199   .0442375     1.38   0.169    -.0260505    .1478903
    llelevsd |  -.0390574   .0139717    -2.80   0.005    -.0665257   -.0115892
       _cons |  -.4517235   .1466027    -3.08   0.002    -.7399426   -.1635044
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. margins inc1, at (llwargrowth = (0(1)15) llnumneighsa=2 llarea=6.2 llage=4.6 
> llelevsd=3.3 lcoastal=1)

Predictive margins                                      Number of obs = 13,705
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llwargrowth  =   0
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
2._at:  llwargrowth  =   1
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
3._at:  llwargrowth  =   2
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
4._at:  llwargrowth  =   3
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
5._at:  llwargrowth  =   4
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
6._at:  llwargrowth  =   5
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
7._at:  llwargrowth  =   6
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
8._at:  llwargrowth  =   7
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
9._at:  llwargrowth  =   8
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
10._at: llwargrowth  =   9
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
11._at: llwargrowth  =  10
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
12._at: llwargrowth  =  11
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
13._at: llwargrowth  =  12
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
14._at: llwargrowth  =  13
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
15._at: llwargrowth  =  14
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
16._at: llwargrowth  =  15
        llarea       = 6.2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .6203411   .0916278     6.77   0.000      .440754    .7999283
        1 1  |   1.481865   .2364056     6.27   0.000     1.018519    1.945212
        2 0  |   .6286253   .0938994     6.69   0.000     .4445859    .8126648
        2 1  |   1.637818    .233635     7.01   0.000     1.179902    2.095734
        3 0  |   .6369095   .1008632     6.31   0.000     .4392214    .8345977
        3 1  |   1.793771   .2383951     7.52   0.000     1.326526    2.261017
        4 0  |   .6451938   .1116444     5.78   0.000     .4263747    .8640128
        4 1  |   1.949725   .2502565     7.79   0.000     1.459231    2.440218
        5 0  |    .653478   .1252613     5.22   0.000     .4079703    .8989857
        5 1  |   2.105678    .268279     7.85   0.000      1.57986    2.631495
        6 0  |   .6617622   .1408941     4.70   0.000     .3856148    .9379096
        6 1  |   2.261631   .2913214     7.76   0.000     1.690651     2.83261
        7 0  |   .6700464   .1579453     4.24   0.000     .3604792    .9796135
        7 1  |   2.417584   .3182952     7.60   0.000     1.793737    3.041431
        8 0  |   .6783306   .1760032     3.85   0.000     .3333707    1.023291
        8 1  |   2.573537   .3482884     7.39   0.000     1.890904     3.25617
        9 0  |   .6866148    .194788     3.52   0.000     .3048374    1.068392
        9 1  |    2.72949   .3805876     7.17   0.000     1.983552    3.475428
       10 0  |    .694899   .2141084     3.25   0.001     .2752543    1.114544
       10 1  |   2.885443   .4146544     6.96   0.000     2.072735    3.698151
       11 0  |   .7031832   .2338317     3.01   0.003     .2448815    1.161485
       11 1  |   3.041396   .4500875     6.76   0.000     2.159241    3.923552
       12 0  |   .7114674   .2538641     2.80   0.005      .213903    1.209032
       12 1  |   3.197349   .4865887     6.57   0.000     2.243653    4.151046
       13 0  |   .7197517   .2741377     2.63   0.009     .1824516    1.257052
       13 1  |   3.353302   .5239346     6.40   0.000     2.326409    4.380195
       14 0  |   .7280359   .2946028     2.47   0.013     .1506249    1.305447
       14 1  |   3.509256    .561957     6.24   0.000      2.40784    4.610671
       15 0  |   .7363201   .3152221     2.34   0.019      .118496    1.354144
       15 1  |   3.665209   .6005273     6.10   0.000     2.488197    4.842221
       16 0  |   .7446043   .3359673     2.22   0.027     .0861206    1.403088
       16 1  |   3.821162   .6395464     5.97   0.000     2.567674     5.07465
------------------------------------------------------------------------------

. marginsplot, xlab(0(1)15) $PLOTOPTS

Variables that uniquely identify margins: llwargrowth inc1

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. graph export country_wargrowth.png, replace
file country_wargrowth.png written in PNG format

. 
. reghdfe lnloss  inc1##c.llarea $CONTROLS, absorb(year) cluster(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(   7,    395) =     107.01
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2450
                                                  Adj R-squared   =     0.2414
                                                  Within R-sq.    =     0.2372
Number of clusters (id)      =        396         Root MSE        =     1.3624

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lnloss | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |  -.7879587   .5164344    -1.53   0.128    -1.803262     .227345
      llarea |    .231249   .0360936     6.41   0.000     .1602895    .3022086
             |
        inc1#|
    c.llarea |
          1  |   .1387146   .0525852     2.64   0.009     .0353327    .2420966
             |
       llage |   .0541452   .0314181     1.72   0.086    -.0076225    .1159128
    lcoastal |   .3312237   .1331184     2.49   0.013     .0695145     .592933
llnumneighsa |   .1372914   .0602319     2.28   0.023     .0188762    .2557065
    llelevsd |  -.0552178   .0219595    -2.51   0.012    -.0983899   -.0120457
       _cons |  -1.397207   .2222446    -6.29   0.000    -1.834137    -.960277
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. margins inc1, at (llarea = (3(1)15) llnumneighsa=2  llage=4.6 llelevsd=3.3 lc
> oastal=1)

Adjusted predictions                                    Number of obs = 13,705
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llarea       =   3
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
2._at:  llarea       =   4
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
3._at:  llarea       =   5
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
4._at:  llarea       =   6
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
5._at:  llarea       =   7
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
6._at:  llarea       =   8
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
7._at:  llarea       =   9
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
8._at:  llarea       =  10
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
9._at:  llarea       =  11
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
10._at: llarea       =  12
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
11._at: llarea       =  13
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
12._at: llarea       =  14
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
13._at: llarea       =  15
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |  -.0308046   .1850809    -0.17   0.868    -.3935566    .3319474
        1 1  |  -.4026193    .443017    -0.91   0.363    -1.270917     .465678
        2 0  |   .2004444   .1599358     1.25   0.210     -.113024    .5139129
        2 1  |  -.0326557   .3956877    -0.08   0.934    -.8081893     .742878
        3 0  |   .4316934   .1396763     3.09   0.002     .1579328    .7054541
        3 1  |    .337308   .3489334     0.97   0.334    -.3465888    1.021205
        4 0  |   .6629425   .1266688     5.23   0.000     .4146761    .9112088
        4 1  |   .7072717   .3030203     2.33   0.020     .1133628    1.301181
        5 0  |   .8941915   .1232315     7.26   0.000     .6526623    1.135721
        5 1  |   1.077235   .2583974     4.17   0.000     .5707858    1.583685
        6 0  |   1.125441   .1301249     8.65   0.000     .8704004    1.380481
        6 1  |   1.447199   .2158661     6.70   0.000     1.024109    1.870289
        7 0  |    1.35669    .145892     9.30   0.000     1.070746    1.642633
        7 1  |   1.817163   .1769412    10.27   0.000     1.470364    2.163961
        8 0  |   1.587939   .1680535     9.45   0.000      1.25856    1.917317
        8 1  |   2.187126   .1445658    15.13   0.000     1.903783     2.47047
        9 0  |   1.819188    .194435     9.36   0.000     1.438102    2.200273
        9 1  |    2.55709   .1239815    20.62   0.000     2.314091    2.800089
       10 0  |   2.050437   .2235474     9.17   0.000     1.612292    2.488582
       10 1  |   2.927054   .1213451    24.12   0.000     2.689222    3.164886
       11 0  |   2.281686   .2544551     8.97   0.000     1.782963    2.780409
       11 1  |   3.297017   .1376914    23.94   0.000     3.027147    3.566888
       12 0  |   2.512935   .2865779     8.77   0.000     1.951252    3.074617
       12 1  |   3.666981   .1675538    21.89   0.000     3.338582    3.995381
       13 0  |   2.744184   .3195494     8.59   0.000     2.117878    3.370489
       13 1  |   4.036945   .2051115    19.68   0.000     3.634934    4.438956
------------------------------------------------------------------------------

. marginsplot, xlab(3(1)15) $PLOTOPTS

Variables that uniquely identify margins: llarea inc1

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. graph export country_area_loss.png, replace
file country_area_loss.png written in PNG format

. 
. // GENERATE FIGURE 9d
. reghdfe lnloss  llarea $X2P $CONTROLS, absorb(year) cluster(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     13,705
Absorbing 1 HDFE group                            F(  10,    395) =     149.62
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2506
                                                  Adj R-squared   =     0.2469
                                                  Within R-sq.    =     0.2429
Number of clusters (id)      =        396         Root MSE        =     1.3574

                                   (Std. err. adjusted for 396 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lnloss | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      llarea |   .2013148   .0287479     7.00   0.000     .1447968    .2578329
      1.inc1 |   .8149318   .2506845     3.25   0.001     .3220891    1.307774
 llwarshrink |   .0072425   .0303338     0.24   0.811    -.0523934    .0668783
             |
        inc1#|
          c. |
 llwarshrink |
          1  |   .0275888    .042306     0.65   0.515    -.0555843     .110762
             |
llpeaceshr~k |    .084248   .0146383     5.76   0.000     .0554692    .1130268
             |
        inc1#|
          c. |
llpeaceshr~k |
          1  |  -.0396179   .0642535    -0.62   0.538    -.1659395    .0867038
             |
       llage |   .0168207   .0259075     0.65   0.517    -.0341132    .0677545
    lcoastal |   .2256097   .1107818     2.04   0.042      .007814    .4434053
llnumneighsa |   .0984683   .0522503     1.88   0.060    -.0042551    .2011917
    llelevsd |   -.058997   .0168437    -3.50   0.001    -.0921114   -.0258826
       _cons |  -1.047536   .1772751    -5.91   0.000    -1.396057   -.6990156
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. margins inc1, at (llwarshrink = (0(1)13) llarea=6.3 llnumneighsa=2  llage=4.6
>  llelevsd=3.3 lcoastal=1)

Predictive margins                                      Number of obs = 13,705
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llarea       = 6.3
        llwarshrink  =   0
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
2._at:  llarea       = 6.3
        llwarshrink  =   1
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
3._at:  llarea       = 6.3
        llwarshrink  =   2
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
4._at:  llarea       = 6.3
        llwarshrink  =   3
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
5._at:  llarea       = 6.3
        llwarshrink  =   4
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
6._at:  llarea       = 6.3
        llwarshrink  =   5
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
7._at:  llarea       = 6.3
        llwarshrink  =   6
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
8._at:  llarea       = 6.3
        llwarshrink  =   7
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
9._at:  llarea       = 6.3
        llwarshrink  =   8
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
10._at: llarea       = 6.3
        llwarshrink  =   9
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
11._at: llarea       = 6.3
        llwarshrink  =  10
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
12._at: llarea       = 6.3
        llwarshrink  =  11
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
13._at: llarea       = 6.3
        llwarshrink  =  12
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3
14._at: llarea       = 6.3
        llwarshrink  =  13
        llage        = 4.6
        lcoastal     =   1
        llnumneighsa =   2
        llelevsd     = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .6401593   .1038587     6.16   0.000     .4365999    .8437186
        1 1  |   1.401397   .2154772     6.50   0.000     .9790695    1.823725
        2 0  |   .6474017   .1038132     6.24   0.000     .4439316    .8508719
        2 1  |   1.436228   .2175148     6.60   0.000     1.009907    1.862549
        3 0  |   .6546442   .1122854     5.83   0.000     .4345689    .8747195
        3 1  |    1.47106   .2236225     6.58   0.000     1.032768    1.909352
        4 0  |   .6618866   .1275896     5.19   0.000     .4118156    .9119577
        4 1  |   1.505891    .233481     6.45   0.000     1.048277    1.963505
        5 0  |   .6691291    .147616     4.53   0.000     .3798071    .9584511
        5 1  |   1.540722    .246641     6.25   0.000     1.057315     2.02413
        6 0  |   .6763716   .1707107     3.96   0.000     .3417848    1.010958
        6 1  |   1.575553   .2626067     6.00   0.000     1.060854    2.090253
        7 0  |    .683614   .1957909     3.49   0.000      .299871    1.067357
        7 1  |   1.610385      .2809     5.73   0.000     1.059831    2.160939
        8 0  |   .6908565   .2221852     3.11   0.002     .2553815    1.126331
        8 1  |   1.645216    .301097     5.46   0.000     1.055077    2.235355
        9 0  |   .6980989   .2494769     2.80   0.005     .2091331    1.187065
        9 1  |   1.680047   .3228405     5.20   0.000     1.047292    2.312803
       10 0  |   .7053414   .2774013     2.54   0.011     .1616448    1.249038
       10 1  |   1.714879   .3458391     4.96   0.000     1.037046    2.392711
       11 0  |   .7125839   .3057851     2.33   0.020     .1132561    1.311912
       11 1  |    1.74971   .3698586     4.73   0.000       1.0248     2.47462
       12 0  |   .7198263   .3345113     2.15   0.031     .0641962    1.375456
       12 1  |   1.784541   .3947128     4.52   0.000     1.010918    2.558164
       13 0  |   .7270688   .3634988     2.00   0.045     .0146242    1.439513
       13 1  |   1.819372   .4202535     4.33   0.000     .9956907    2.643054
       14 0  |   .7343112   .3926898     1.87   0.061    -.0353466    1.503969
       14 1  |   1.854204    .446363     4.15   0.000     .9793484    2.729059
------------------------------------------------------------------------------

. marginsplot, xlab(0(1)13) $PLOTOPTS

Variables that uniquely identify margins: llwarshrink inc1

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. graph export country_llshrinkwar.png, replace 
file country_llshrinkwar.png written in PNG format

. 
. /////////////////////////////////////////////////////////////////////////////
> ///////////////////////
> // Partioning sample above and below median state size
. 
. // GEMERATE TABLE A14
. 
. eststo clear

. global X1 "warXwargrowth peaceXwargrowth warXpeacegrowth peaceXpeacegrowth"

. global CONTROLS " llage lcoastal llnumneighsa llelevsd"

. global TIMEVARS1 "nogainyear ngspline*"

. 
. 
. eststo clear

. 
. 
. reghdfe lngain  inc1 warXsize  llarea $CONTROLS $TIMEVARS1 if abovemed==1, ab
> sorb(year) cluster(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      6,824
Absorbing 1 HDFE group                            F(  11,    237) =     116.98
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2669
                                                  Adj R-squared   =     0.2593
                                                  Within R-sq.    =     0.2536
Number of clusters (id)      =        238         Root MSE        =     1.9546

                                   (Std. err. adjusted for 238 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -1.419472   .7466511    -1.90   0.058    -2.890392    .0514489
    warXsize |   .2354097   .0692094     3.40   0.001     .0990655     .371754
      llarea |   .2517162   .0293026     8.59   0.000     .1939893     .309443
       llage |  -.0253964    .063569    -0.40   0.690    -.1506288    .0998359
    lcoastal |   .2203749   .1011919     2.18   0.030     .0210245    .4197253
llnumneighsa |   .1355991   .0614593     2.21   0.028     .0145229    .2566753
    llelevsd |    .047549   .0331253     1.44   0.152    -.0177085    .1128066
  nogainyear |   .0793096   .0123468     6.42   0.000     .0549862     .103633
   ngspline1 |   .0006149   .0000763     8.06   0.000     .0004646    .0007653
   ngspline2 |  -.0001739   .0000209    -8.31   0.000    -.0002152   -.0001327
   ngspline3 |   5.56e-06   6.43e-07     8.64   0.000     4.29e-06    6.83e-06
       _cons |  -1.654863   .3540113    -4.67   0.000    -2.352274   -.9574521
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estadd local part "Above Median"

added macro:
               e(part) : "Above Median"

. estimates store m1

. 
. reghdfe lngain  inc1 warXsize  llarea $CONTROLS $TIMEVARS1 if abovemed==0, ab
> sorb(year) cluster(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      6,881
Absorbing 1 HDFE group                            F(  11,    204) =     608.06
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1311
                                                  Adj R-squared   =     0.1222
                                                  Within R-sq.    =     0.1199
Number of clusters (id)      =        205         Root MSE        =     0.3562

                                   (Std. err. adjusted for 205 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   -1.72906   .1221726   -14.15   0.000    -1.969943   -1.488177
    warXsize |   .4036485   .0282653    14.28   0.000     .3479189    .4593781
      llarea |   .0376503   .0084882     4.44   0.000     .0209144    .0543862
       llage |   .0899187   .0163087     5.51   0.000     .0577635    .1220738
    lcoastal |   .1622815    .056513     2.87   0.005     .0508569    .2737061
llnumneighsa |  -.0364399    .014038    -2.60   0.010    -.0641182   -.0087617
    llelevsd |   -.007829   .0051632    -1.52   0.131     -.018009     .002351
  nogainyear |   .0223214   .0058519     3.81   0.000     .0107834    .0338593
   ngspline1 |   .0001882   .0000362     5.20   0.000     .0001168    .0002596
   ngspline2 |  -.0000533   9.82e-06    -5.43   0.000    -.0000727   -.0000339
   ngspline3 |   1.68e-06   2.36e-07     7.15   0.000     1.22e-06    2.15e-06
       _cons |   -.271152   .0786578    -3.45   0.001    -.4262384   -.1160656
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estadd local part "Below Median"

added macro:
               e(part) : "Below Median"

. estimates store m2

. 
. reghdfe lngain  inc1 $X1 llarea $CONTROLS $TIMEVARS1 if abovemed==1, absorb(y
> ear) cluster(id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      6,824
Absorbing 1 HDFE group                            F(  14,    237) =      96.64
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2692
                                                  Adj R-squared   =     0.2613
                                                  Within R-sq.    =     0.2559
Number of clusters (id)      =        238         Root MSE        =     1.9520

                                   (Std. err. adjusted for 238 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .8744231   .2574472     3.40   0.001     .3672459      1.3816
warXwargro~h |   .1416663   .0431164     3.29   0.001     .0567259    .2266066
peaceXwarg~h |  -.0206372   .0202691    -1.02   0.310    -.0605677    .0192934
warXpeaceg~h |  -.0440539   .0479013    -0.92   0.359    -.1384206    .0503129
peaceXpeac~h |   .0293084   .0150062     1.95   0.052    -.0002541    .0588709
      llarea |   .2455353   .0352557     6.96   0.000     .1760808    .3149898
       llage |  -.0545271   .0553044    -0.99   0.325    -.1634781    .0544238
    lcoastal |    .187004    .098912     1.89   0.060     -.007855     .381863
llnumneighsa |   .1178097   .0568602     2.07   0.039     .0057938    .2298256
    llelevsd |   .0500397   .0326584     1.53   0.127    -.0142982    .1143776
  nogainyear |   .0833619   .0123909     6.73   0.000     .0589516    .1077723
   ngspline1 |   .0006329   .0000769     8.23   0.000     .0004814    .0007844
   ngspline2 |  -.0001787   .0000211    -8.46   0.000    -.0002203   -.0001371
   ngspline3 |   5.68e-06   6.59e-07     8.61   0.000     4.38e-06    6.98e-06
       _cons |   -1.54492   .3108101    -4.97   0.000    -2.157223   -.9326165
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estadd local part "Above Median"

added macro:
               e(part) : "Above Median"

. estimates store m3

. 
. reghdfe lngain  inc1 $X1 llarea $CONTROLS $TIMEVARS1 if abovemed==0, absorb(y
> ear) cluster(id)
(MWFE estimator converged in 1 iterations)
note: warXpeacegrowth omitted because of collinearity

HDFE Linear regression                            Number of obs   =      6,881
Absorbing 1 HDFE group                            F(  13,    204) =     481.29
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1333
                                                  Adj R-squared   =     0.1241
                                                  Within R-sq.    =     0.1221
Number of clusters (id)      =        205         Root MSE        =     0.3558

                                   (Std. err. adjusted for 205 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      lngain | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .0254178   .1121136     0.23   0.821    -.1956322    .2464678
warXwargro~h |    .704134   .1546045     4.55   0.000     .3993064    1.008962
peaceXwarg~h |   .0520945   .0627304     0.83   0.407    -.0715886    .1757776
warXpeaceg~h |          0  (omitted)
peaceXpeac~h |   .0288376   .0172301     1.67   0.096    -.0051343    .0628096
      llarea |   .0334188   .0080086     4.17   0.000     .0176285    .0492092
       llage |   .0812622   .0163501     4.97   0.000     .0490253    .1134991
    lcoastal |   .1709011   .0552379     3.09   0.002     .0619908    .2798115
llnumneighsa |  -.0301587   .0144807    -2.08   0.039    -.0587096   -.0016077
    llelevsd |  -.0089037   .0049063    -1.81   0.071    -.0185771    .0007698
  nogainyear |   .0238156   .0058138     4.10   0.000     .0123527    .0352786
   ngspline1 |   .0001925   .0000358     5.38   0.000      .000122    .0002631
   ngspline2 |  -.0000542   9.70e-06    -5.59   0.000    -.0000734   -.0000351
   ngspline3 |   1.64e-06   2.33e-07     7.06   0.000     1.19e-06    2.10e-06
       _cons |   -.251851   .0764607    -3.29   0.001    -.4026057   -.1010964
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local statefe "No"

added macro:
            e(statefe) : "No"

. estadd local part "Below Median"

added macro:
               e(part) : "Below Median"

. estimates store m4

. 
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. esttab m1 m2 m3 m4 using "statelevel_median.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast  depvars ///
> title("Territorial change with samples above and below median state size \lab
> el{tab:country:median}") ///
> order (inc1 warXsize llarea $X1) /// $CONTROLS) ///
> keep (inc1 warXsize llarea $X1) /// $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states in parentheses." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "statefe State FE"
>  "part Subsample")
(output written to statelevel_median.tex)

. 
. 
. /////////////////////////////////////////////////////////////////////////////
> ///////////////////////
> // Cox duration models
. // 
. 
. gen larea = log(area)

. gen lelevsd = log(elevationsd + 1)

. 
. capture drop warXsize 

. gen warXsize = inc1*lnarea

. 
. gen lwarXsize = linc1*llarea
(637 missing values generated)

. gen lwarXwargrowth = linc1*llwargrowth
(637 missing values generated)

. gen lwarXpeacegrowth = linc1*llpeacegrowth
(637 missing values generated)

. gen lwarXwarshrink = linc1*llwarshrink
(637 missing values generated)

. gen lwarXpeaceshrink = linc1*llpeaceshrink
(637 missing values generated)

. 
. 
. 
. 
. label variable linc1 "war"

. label variable larea "log state size"

. label variable warXsize "war X state size"

. label variable lwargrowth "cumul. war gains"

. label variable lpeacegrowth "cumul. peace gains"

. label variable lwarshrink "log cumul. war losses"

. label variable lpeaceshrink "log cumul. peace losses"

. 
. global CONTROLSD "lnumneighsa lcoastal lelevsd"

. 
. global XD "llwargrowth lwarXwargrowth llpeacegrowth lwarXpeacegrowth llwarshr
> ink lwarXwarshrink llpeaceshrink lwarXpeaceshrink"

. 
. 
. // GENERATE TABLE 2
. eststo clear

. stset year, failure(death)

Survival-time data settings

         Failure event: death!=0 & death<.
Observed time interval: (0, year]
     Exit on or before: failure

--------------------------------------------------------------------------
     14,342  total observations
          0  exclusions
--------------------------------------------------------------------------
     14,342  observations remaining, representing
        422  failures in single-record/single-failure data
   23464870  total analysis time at risk and under observation
                                                At risk from t =         0
                                     Earliest observed entry t =         0
                                          Last observed exit t =     1,790

. 
. stcox inc1 larea $CONTROLSD, nohr cluster(id) efron

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log pseudolikelihood = -3676.8413
Iteration 1:   log pseudolikelihood =  -3635.079
Iteration 2:   log pseudolikelihood = -3628.8489
Iteration 3:   log pseudolikelihood = -3628.6854
Iteration 4:   log pseudolikelihood = -3628.6852
Refining estimates:
Iteration 0:   log pseudolikelihood = -3628.6852

Cox regression with Efron method for ties

No. of subjects =     14,342                            Number of obs = 14,342
No. of failures =        422
Time at risk    = 23,464,870
                                                        Wald chi2(5)  =  41.93
Log pseudolikelihood = -3628.6852                       Prob > chi2   = 0.0000

                                   (Std. err. adjusted for 426 clusters in id)
------------------------------------------------------------------------------
             |               Robust
          _t | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .2072633   .3609465     0.57   0.566    -.5001789    .9147055
       larea |   .2558438   .0634617     4.03   0.000     .1314611    .3802264
 lnumneighsa |  -.0421662   .0101348    -4.16   0.000      -.06203   -.0223024
    lcoastal |  -1.189093   .3613543    -3.29   0.001    -1.897334   -.4808515
     lelevsd |  -.0467281   .0567629    -0.82   0.410    -.1579813    .0645251
------------------------------------------------------------------------------

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estimates store m1

. 
. stcox inc1 larea warXsize $CONTROLSD, nohr cluster(id) efron

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log pseudolikelihood = -3676.8413
Iteration 1:   log pseudolikelihood =   -3620.17
Iteration 2:   log pseudolikelihood = -3601.0635
Iteration 3:   log pseudolikelihood = -3600.2052
Iteration 4:   log pseudolikelihood = -3600.2006
Refining estimates:
Iteration 0:   log pseudolikelihood = -3600.2006

Cox regression with Efron method for ties

No. of subjects =     14,342                            Number of obs = 14,342
No. of failures =        422
Time at risk    = 23,464,870
                                                        Wald chi2(6)  =  79.02
Log pseudolikelihood = -3600.2006                       Prob > chi2   = 0.0000

                                   (Std. err. adjusted for 426 clusters in id)
------------------------------------------------------------------------------
             |               Robust
          _t | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   5.166023   1.063414     4.86   0.000     3.081771    7.250276
       larea |   .3454988   .0563927     6.13   0.000      .234971    .4560265
    warXsize |  -.4632303   .0953874    -4.86   0.000    -.6501862   -.2762744
 lnumneighsa |  -.0450105   .0100358    -4.48   0.000    -.0646804   -.0253406
    lcoastal |   -1.14922   .3125679    -3.68   0.000    -1.761842   -.5365982
     lelevsd |  -.0927724   .0545494    -1.70   0.089    -.1996873    .0141425
------------------------------------------------------------------------------

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estimates store m2

. 
. stcox inc1 warXsize larea lwargrowth lpeacegrowth lwarshrink lpeaceshrink $CO
> NTROLSD, nohr cluster(id) efron

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log pseudolikelihood = -3676.8413
Iteration 1:   log pseudolikelihood = -3586.3175
Iteration 2:   log pseudolikelihood = -3567.8833
Iteration 3:   log pseudolikelihood = -3566.9021
Iteration 4:   log pseudolikelihood = -3566.8962
Iteration 5:   log pseudolikelihood = -3566.8962
Refining estimates:
Iteration 0:   log pseudolikelihood = -3566.8962

Cox regression with Efron method for ties

No. of subjects =     14,342                            Number of obs = 14,342
No. of failures =        422
Time at risk    = 23,464,870
                                                        Wald chi2(10) = 153.20
Log pseudolikelihood = -3566.8962                       Prob > chi2   = 0.0000

                                   (Std. err. adjusted for 426 clusters in id)
------------------------------------------------------------------------------
             |               Robust
          _t | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   4.351947   1.070652     4.06   0.000     2.253507    6.450387
    warXsize |  -.3385473   .1056984    -3.20   0.001    -.5457123   -.1313822
       larea |   .4802862    .058561     8.20   0.000     .3655088    .5950637
  lwargrowth |  -.2195381   .0653996    -3.36   0.001     -.347719   -.0913571
lpeacegrowth |  -.0801822   .0352214    -2.28   0.023    -.1492148   -.0111495
  lwarshrink |   .0339342   .0513962     0.66   0.509    -.0668005    .1346689
lpeaceshrink |  -.0694241   .0387056    -1.79   0.073    -.1452857    .0064376
 lnumneighsa |  -.0328391    .010445    -3.14   0.002    -.0533109   -.0123673
    lcoastal |  -.5925869   .2936114    -2.02   0.044    -1.168055   -.0171192
     lelevsd |    -.11222   .0541841    -2.07   0.038    -.2184189   -.0060211
------------------------------------------------------------------------------

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estimates store m3

. 
. esttab m1 m2 m3 using "cox_death.tex", replace  /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nodepvars ///
> title("Cox proportional hazard models of state death \label{tab:coxmodels}") 
> ///
> order (inc1 larea warXsize  lwargrowth lpeacegrowth lwarshrink lpeaceshrink) 
> ///  $CONTROLSD) ///
> keep (inc1 larea warXsize  lwargrowth lpeacegrowth lwarshrink lpeaceshrink) /
> //  $CONTROLSD) ///
>  nonotes addnotes("Standard errors clustered on states in parentheses." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>  scalars("geocontrols Geo. Controls")
(output written to cox_death.tex)

. 
.  
. 
. // GENERATE FIGURE 10: INTERACTION PLOT
.  
. stcox inc1##c.larea $CONTROLSD, nohr strata(year)

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log likelihood = -2304.7776
Iteration 1:   log likelihood = -2271.3056
Iteration 2:   log likelihood = -2256.5952
Iteration 3:   log likelihood = -2255.4013
Iteration 4:   log likelihood = -2255.3785
Iteration 5:   log likelihood = -2255.3785
Refining estimates:
Iteration 0:   log likelihood = -2255.3785

Stratified Cox regression with Breslow method for ties
Strata variable: year

No. of subjects =     14,342                            Number of obs = 14,342
No. of failures =        422
Time at risk    = 23,464,870
                                                        LR chi2(6)    =  98.80
Log likelihood = -2255.3785                             Prob > chi2   = 0.0000

------------------------------------------------------------------------------
          _t | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |   4.252999   .6335203     6.71   0.000     3.011322    5.494676
       larea |   .2867746    .036604     7.83   0.000     .2150321    .3585172
             |
inc1#c.larea |
          1  |  -.4097684   .0630532    -6.50   0.000    -.5333503   -.2861864
             |
 lnumneighsa |  -.0320772   .0073158    -4.38   0.000    -.0464159   -.0177384
    lcoastal |  -.7507994   .1920415    -3.91   0.000    -1.127194    -.374405
     lelevsd |  -.0704724     .03652    -1.93   0.054    -.1420503    .0011055
------------------------------------------------------------------------------

. 
. margins inc1, at (larea = (3(1)15)  lnumneighsa=2 lelevsd=3.3) predict(xb)

Predictive margins                                      Number of obs = 14,342
Model VCE: OIM

Expression: Linear prediction, predict(xb)
1._at:  larea       =   3
        lnumneighsa =   2
        lelevsd     = 3.3
2._at:  larea       =   4
        lnumneighsa =   2
        lelevsd     = 3.3
3._at:  larea       =   5
        lnumneighsa =   2
        lelevsd     = 3.3
4._at:  larea       =   6
        lnumneighsa =   2
        lelevsd     = 3.3
5._at:  larea       =   7
        lnumneighsa =   2
        lelevsd     = 3.3
6._at:  larea       =   8
        lnumneighsa =   2
        lelevsd     = 3.3
7._at:  larea       =   9
        lnumneighsa =   2
        lelevsd     = 3.3
8._at:  larea       =  10
        lnumneighsa =   2
        lelevsd     = 3.3
9._at:  larea       =  11
        lnumneighsa =   2
        lelevsd     = 3.3
10._at: larea       =  12
        lnumneighsa =   2
        lelevsd     = 3.3
11._at: larea       =  13
        lnumneighsa =   2
        lelevsd     = 3.3
12._at: larea       =  14
        lnumneighsa =   2
        lelevsd     = 3.3
13._at: larea       =  15
        lnumneighsa =   2
        lelevsd     = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .4677582   .0866871     5.40   0.000     .2978547    .6376618
        1 1  |   3.491452   .4730643     7.38   0.000     2.564263    4.418641
        2 0  |   .7545328   .0990797     7.62   0.000     .5603401    .9487255
        2 1  |   3.368459   .4246126     7.93   0.000     2.536233    4.200684
        3 0  |   1.041307   .1216497     8.56   0.000     .8028785    1.279736
        3 1  |   3.245465   .3803655     8.53   0.000     2.499962    3.990967
        4 0  |   1.328082   .1498673     8.86   0.000     1.034348    1.621817
        4 1  |   3.122471   .3419591     9.13   0.000     2.452244    3.792699
        5 0  |   1.614857   .1811117     8.92   0.000     1.259884    1.969829
        5 1  |   2.999477   .3115609     9.63   0.000     2.388829    3.610125
        6 0  |   1.901631   .2140617     8.88   0.000     1.482078    2.321185
        6 1  |   2.876484   .2916855     9.86   0.000     2.304791    3.448177
        7 0  |   2.188406   .2480385     8.82   0.000     1.702259    2.674553
        7 1  |    2.75349   .2845465     9.68   0.000     2.195789    3.311191
        8 0  |   2.475181    .282672     8.76   0.000     1.921154    3.029208
        8 1  |   2.630496   .2910825     9.04   0.000     2.059985    3.201007
        9 0  |   2.761955   .3177477     8.69   0.000     2.139181    3.384729
        9 1  |   2.507502    .310431     8.08   0.000     1.899069    3.115936
       10 0  |    3.04873   .3531336     8.63   0.000     2.356601    3.740859
       10 1  |   2.384509   .3404143     7.00   0.000     1.717309    3.051708
       11 0  |   3.335505   .3887452     8.58   0.000     2.573578    4.097431
       11 1  |   2.261515   .3785134     5.97   0.000     1.519642    3.003388
       12 0  |   3.622279   .4245257     8.53   0.000     2.790224    4.454334
       12 1  |   2.138521   .4225387     5.06   0.000     1.310361    2.966682
       13 0  |   3.909054   .4604356     8.49   0.000     3.006617    4.811491
       13 1  |   2.015528   .4708308     4.28   0.000     1.092716    2.938339
------------------------------------------------------------------------------

. marginsplot, xlab(3(1)15) $PLOTOPTS 

Variables that uniquely identify margins: larea inc1

. graph export cox_area_death.png, replace
file cox_area_death.png written in PNG format

. 
. stcox linc1##c.llarea linc1##c.llwargrowth linc1##c.llpeacegrowth linc1##c.ll
> warshrink linc1##c.llpeaceshrink  $CONTROLSD, nohr strata(year)

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log likelihood = -1925.5568
Iteration 1:   log likelihood = -1895.3242
Iteration 2:   log likelihood = -1891.6012
Iteration 3:   log likelihood = -1891.5051
Iteration 4:   log likelihood = -1891.5048
Refining estimates:
Iteration 0:   log likelihood = -1891.5048

Stratified Cox regression with Breslow method for ties
Strata variable: year

No. of subjects =     13,705                            Number of obs = 13,705
No. of failures =        355
Time at risk    = 22,458,055
                                                        LR chi2(14)   =  68.10
Log likelihood = -1891.5048                             Prob > chi2   = 0.0000

------------------------------------------------------------------------------
          _t | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     1.linc1 |   2.785212   1.049097     2.65   0.008     .7290199    4.841405
      llarea |   .3191512   .0544372     5.86   0.000     .2124563    .4258461
             |
       linc1#|
    c.llarea |
          1  |  -.2492451   .1166597    -2.14   0.033    -.4778938   -.0205964
             |
 llwargrowth |  -.2714681   .1294497    -2.10   0.036    -.5251849   -.0177513
             |
       linc1#|
          c. |
 llwargrowth |
          1  |   .2408564   .1445328     1.67   0.096    -.0424227    .5241355
             |
llpeacegro~h |  -.0038679   .0327587    -0.12   0.906    -.0680738    .0603379
             |
       linc1#|
          c. |
llpeacegro~h |
          1  |  -.1437102   .0760629    -1.89   0.059    -.2927908    .0053704
             |
 llwarshrink |    .042115    .101114     0.42   0.677    -.1560648    .2402948
             |
       linc1#|
          c. |
 llwarshrink |
          1  |   -.096428   .1185989    -0.81   0.416    -.3288775    .1360215
             |
llpeaceshr~k |  -.0878935   .0352583    -2.49   0.013    -.1569985   -.0187885
             |
       linc1#|
          c. |
llpeaceshr~k |
          1  |    .136721   .0767069     1.78   0.075    -.0136217    .2870637
             |
 lnumneighsa |   -.009702   .0069984    -1.39   0.166    -.0234187    .0040147
    lcoastal |  -.1928397    .205344    -0.94   0.348    -.5953065    .2096271
     lelevsd |  -.0927169   .0410027    -2.26   0.024    -.1730806   -.0123532
------------------------------------------------------------------------------

. 
. graph export cox_area_death.png, replace
file cox_area_death.png written in PNG format

. 
. *****************************************************************************
> ***
. *****************************************************************************
> ***
. ** Robustness
. *****************************************************************************
> ***
. *****************************************************************************
> ***
. 
. ** Add center/periphery and Urban population controls
. 
. // GENERATE TABLE A1
. 
. global CONTROLSD2 "lcentral lurban"

. 
. 
. eststo clear

. stset year, failure(death)

Survival-time data settings

         Failure event: death!=0 & death<.
Observed time interval: (0, year]
     Exit on or before: failure

--------------------------------------------------------------------------
     14,342  total observations
          0  exclusions
--------------------------------------------------------------------------
     14,342  observations remaining, representing
        422  failures in single-record/single-failure data
   23464870  total analysis time at risk and under observation
                                                At risk from t =         0
                                     Earliest observed entry t =         0
                                          Last observed exit t =     1,790

. 
. stcox inc1 larea $CONTROLSD $CONTROLSD2, nohr cluster(id) efron

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log pseudolikelihood =  -2896.694
Iteration 1:   log pseudolikelihood = -2874.4466
Iteration 2:   log pseudolikelihood = -2873.4891
Iteration 3:   log pseudolikelihood = -2873.4859
Iteration 4:   log pseudolikelihood = -2873.4859
Refining estimates:
Iteration 0:   log pseudolikelihood = -2873.4859

Cox regression with Efron method for ties

No. of subjects =     12,672                            Number of obs = 12,672
No. of failures =        337
Time at risk    = 20,769,080
                                                        Wald chi2(7)  =  27.31
Log pseudolikelihood = -2873.4859                       Prob > chi2   = 0.0003

                                   (Std. err. adjusted for 371 clusters in id)
------------------------------------------------------------------------------
             |               Robust
          _t | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.0843344   .3720778    -0.23   0.821    -.8135934    .6449247
       larea |   .1688449   .0709792     2.38   0.017     .0297282    .3079615
 lnumneighsa |  -.0181298   .0073048    -2.48   0.013    -.0324469   -.0038127
    lcoastal |   -.484962   .3900337    -1.24   0.214    -1.249414    .2794899
     lelevsd |  -.0399247   .0582163    -0.69   0.493    -.1540265    .0741771
    lcentral |   .5271348   .1277283     4.13   0.000     .2767921    .7774776
      lurban |   .2068697    .374596     0.55   0.581    -.5273249    .9410643
------------------------------------------------------------------------------

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estimates store m1

. 
. stcox inc1 larea warXsize $CONTROLSD $CONTROLSD2, nohr cluster(id) efron

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log pseudolikelihood =  -2896.694
Iteration 1:   log pseudolikelihood = -2862.0851
Iteration 2:   log pseudolikelihood = -2855.3611
Iteration 3:   log pseudolikelihood = -2855.2858
Iteration 4:   log pseudolikelihood = -2855.2858
Refining estimates:
Iteration 0:   log pseudolikelihood = -2855.2858

Cox regression with Efron method for ties

No. of subjects =     12,672                            Number of obs = 12,672
No. of failures =        337
Time at risk    = 20,769,080
                                                        Wald chi2(8)  =  58.88
Log pseudolikelihood = -2855.2858                       Prob > chi2   = 0.0000

                                   (Std. err. adjusted for 371 clusters in id)
------------------------------------------------------------------------------
             |               Robust
          _t | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   4.787534   1.030854     4.64   0.000     2.767098     6.80797
       larea |   .2589717   .0673984     3.84   0.000     .1268733    .3910701
    warXsize |  -.4440475   .0915921    -4.85   0.000    -.6235647   -.2645303
 lnumneighsa |  -.0213581   .0074536    -2.87   0.004    -.0359669   -.0067493
    lcoastal |  -.5857664    .362573    -1.62   0.106    -1.296396    .1248636
     lelevsd |  -.0819468   .0568138    -1.44   0.149    -.1932998    .0294063
    lcentral |   .5068017   .1275511     3.97   0.000     .2568061    .7567973
      lurban |  -.1865488   .4479878    -0.42   0.677    -1.064589    .6914912
------------------------------------------------------------------------------

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estimates store m2

. 
. stcox inc1 warXsize larea lwargrowth lpeacegrowth lwarshrink lpeaceshrink $CO
> NTROLSD $CONTROLSD2, nohr cluster(id) efron

        Failure _d: death
  Analysis time _t: year

Iteration 0:   log pseudolikelihood =  -2896.694
Iteration 1:   log pseudolikelihood = -2887.4322
Iteration 2:   log pseudolikelihood = -2832.6309
Iteration 3:   log pseudolikelihood = -2825.4129
Iteration 4:   log pseudolikelihood = -2824.4457
Iteration 5:   log pseudolikelihood = -2824.4122
Iteration 6:   log pseudolikelihood = -2824.4122
Refining estimates:
Iteration 0:   log pseudolikelihood = -2824.4122

Cox regression with Efron method for ties

No. of subjects =     12,672                            Number of obs = 12,672
No. of failures =        337
Time at risk    = 20,769,080
                                                        Wald chi2(12) = 103.01
Log pseudolikelihood = -2824.4122                       Prob > chi2   = 0.0000

                                   (Std. err. adjusted for 371 clusters in id)
------------------------------------------------------------------------------
             |               Robust
          _t | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   2.957948   1.078567     2.74   0.006     .8439956      5.0719
    warXsize |  -.1811098   .1057718    -1.71   0.087    -.3884188    .0261992
       larea |   .4550668   .0864708     5.26   0.000      .285587    .6245465
  lwargrowth |  -.2921236   .0773772    -3.78   0.000    -.4437801   -.1404671
lpeacegrowth |  -.1021668   .0412328    -2.48   0.013    -.1829816   -.0213519
  lwarshrink |   .0426826   .0610064     0.70   0.484    -.0768878     .162253
lpeaceshrink |  -.0365827   .0414174    -0.88   0.377    -.1177594     .044594
 lnumneighsa |  -.0141406   .0092335    -1.53   0.126     -.032238    .0039567
    lcoastal |  -.3840492   .3411026    -1.13   0.260    -1.052598    .2844996
     lelevsd |  -.1256238   .0597807    -2.10   0.036    -.2427919   -.0084557
    lcentral |   .5680925   .1308498     4.34   0.000     .3116317    .8245533
      lurban |    .100772   .4322603     0.23   0.816    -.7464427    .9479867
------------------------------------------------------------------------------

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estimates store m3

. 
. 
. esttab m1 m2 m3 using "cox_death_centper_urban_vars.tex", replace  /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nodepvars ///
> title("Cox proportional hazard models of state death \label{tab:coxmodels-cpu
> }") ///
> order (inc1 larea warXsize lwargrowth lpeacegrowth lwarshrink lpeaceshrink lc
> entral lurban) ///  $CONTROLSD) ///
> keep (inc1 larea warXsize  lwargrowth lpeacegrowth lwarshrink lpeaceshrink lc
> entral lurban) ///  $CONTROLSD) ///
>  nonotes addnotes("Standard errors clustered on states in parentheses." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>  scalars("geocontrols Geo. Controls")
(output written to cox_death_centper_urban_vars.tex)

. 
. 
. *****************************************************************************
> ***
. 
. // GENERATE FIGURE 2
. // tfrac plot
. tsline tconc if tconc>=0 & tconc<=0.3, yscale(range(0.0 0.3)) ylabel(0.0 (0.0
> 5) 0.3) graphregion(style(none) color(white)) ytitle("Territorial Concentrati
> on")

. graph export herfindahl_plot_ab2.png, replace
file herfindahl_plot_ab2.png written in PNG format

. 
. // GENERATE FIGURE 3
. 
. twoway (kdensity lnarea if year==1590 & waryears<5, recast(area) range(0 20) 
> lcolor(black) fcolor("102 205 0%5")) /// 
> (kdensity lnarea if year==1690 & waryears<10, recast(area) range(0 20) lcolor
> (black) fcolor("102 205 0%20")) /// 
> (kdensity lnarea if year==1790 & waryears<15, recast(area) range(0 20) lcolor
> (black) fcolor("102 205 0%45")) /// 
> (kdensity lnarea if year==1590 & waryears>=5, recast(area) range(0 20) lcolor
> (black) fcolor("255 0 0%40")) ///
> (kdensity lnarea if year==1690 & waryears>=10, recast(area) range(0 20) lcolo
> r(black) fcolor("255 0 0%55")) ///
> (kdensity lnarea if year==1790 & waryears>=15, recast(area) range(0 20) lcolo
> r(black) fcolor("255 0 0%70")), ///
>  legend( lab(1 "less war in 1590") lab(2 "less war in 1690") lab(3 "less war 
> in 1790") lab(4 "more war in 1590") lab(5 "more war in 1690") lab(6 "more war
>  in 1790") order(1 4 2 5 3 6)) ///
>  graphregion(style(none) color(white)) ytitle(Density) xtitle(log state size)

. graph export state_size_comparison_1500v1790_logscale.png, replace
file state_size_comparison_1500v1790_logscale.png written in PNG format

. 
. 
end of do-file

. 
. ** Analysis: Dyadic level
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "analysis_dyads.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: analysis_dyads.do
. ** Main script for dyadic analysis with Abramson data
. ** Required file paths set in runall.do
. *****************************************************************************
> ***
. 
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles

. use dyad_analysis2, clear

.  
. gen peaceXgrowthwara = (1-inc1)*llgrowthwara
(186,662 missing values generated)

. gen peaceXgrowthpeacea = (1-inc1)*llgrowthpeacea
(186,662 missing values generated)

. gen peaceXshrinkwarb = (1-inc1)*llshrinkwarb
(186,662 missing values generated)

. gen peaceXshrinkpeaceb = (1-inc1)*llshrinkpeaceb
(186,662 missing values generated)

. 
. gen lrwara = l5.growthwara/(l5.llareaa)
(457,386 missing values generated)

. gen lrXlr = lr * lr
(362,302 missing values generated)

. 
. gen peaceXllr = (1-inc1)*llr
(362,302 missing values generated)

. gen initXllr = incinita1 * llr
(362,302 missing values generated)

. 
. replace llelevsda = 0 if llelevsda == .
(186,662 real changes made)

. replace llelevsdb = 0 if llelevsdb == .
(528,206 real changes made)

. 
. 
. label variable lnga "log terr. gain A"

. label variable lneigh "neighbors AB"

. label variable llnumneighsa "\\# neighbors A"

. label variable llnumneighsb "\\# neighbors B"

. label variable lldist "log distance AB"

. label variable inc1 "war AB"

. label variable lr "rel. size A/AB"

. label variable lrXlr "rel. size ^2"

. label variable llr "rel. log size A/AB"

. label variable inc1Xllr "war X rel. log size"

. label variable peaceXllr "peace X rel. log size"

. label variable llareaa "log size A"

. label variable lcoastala "Coastal access A"

. label variable lcoastalb "Coastal access B"

. label variable llagea "log age A"

. label variable llageb "log age B"

. label variable llareab "log size B"

. label variable llelevsda "log elev. SD A"

. label variable llelevsdb "log elev SD B"

. 
. label variable lurbana "urban share A"

. label variable lurbanb "urban share B"

. 
. label variable lcentrala "core (A)"

. label variable lcentralb "core (B)"

. 
. label variable llgrowthwara "cumul. war gains A"

. label variable llgrowthpeacea "cumul. peace gains A"

. label variable inc1Xgrowthwara "war X war gains A"

. label variable inc1Xgrowthpeacea "war X peace gains A"

. 
. label variable peaceXgrowthwara "peace X war gains A"

. label variable peaceXgrowthpeacea "peace X peace gains A"

. 
. 
. label variable llshrinkwarb "cumul. war losses B"

. label variable llshrinkpeaceb "cumul. peace losses B"

. label variable inc1Xshrinkwarb "war X war losses B"

. label variable inc1Xshrinkpeaceb "war X peace losses B"

. 
. label variable peaceXshrinkwarb "peace X war losses B"

. label variable peaceXshrinkpeaceb "peace X peace losses B"

. 
. label variable incinita1 "A initiator"

. label variable initXllr "A init. X rel. size"

. 
. label variable llgrowtha "cumul. gains A"

. label variable llshrinkb "cumul. losses B"

. 
. 
. // GENERATE TABLE 3
. // MAIN DYADIC MODELS FOR PAPER
. 
. eststo clear

. global X "inc1Xgrowthwara peaceXgrowthwara inc1Xgrowthpeacea peaceXgrowthpeac
> ea inc1Xshrinkwarb peaceXshrinkwarb inc1Xshrinkpeaceb peaceXshrinkpeaceb"

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb"

. global TIMEVARS "noeventyear evspline*"

. 
. reghdfe lnga0 inc1 llr  llareab $CONTROLS $TIMEVARS, absorb(year) cluster(idd
> 2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  17,    423) =       7.78
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1556
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.1555
Number of clusters (ida)     =        424         Within R-sq.    =     0.1552
Number of clusters (idb)     =        424         Root MSE        =     0.1624

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   1.158838   .2139261     5.42   0.000     .7383474    1.579329
         llr |   .0663613   .0148367     4.47   0.000     .0371984    .0955242
     llareab |   .0069881   .0014443     4.84   0.000     .0041492    .0098271
      lldist |  -.0079526   .0015769    -5.04   0.000     -.011052   -.0048531
      lneigh |   .0731897   .0111281     6.58   0.000     .0513165    .0950629
   lcoastala |   .0156615   .0038751     4.04   0.000     .0080447    .0232783
   lcoastalb |   .0029278    .003226     0.91   0.365    -.0034133    .0092688
      llagea |   .1244893   .0153155     8.13   0.000     .0943853    .1545933
      llageb |   .1228504   .0151441     8.11   0.000     .0930833    .1526175
llnumneighsa |  -.0044299   .0023862    -1.86   0.064    -.0091202    .0002603
llnumneighsb |  -.0062231   .0024267    -2.56   0.011    -.0109929   -.0014533
   llelevsda |  -.0025089   .0007399    -3.39   0.001    -.0039633   -.0010545
   llelevsdb |  -.0013496   .0004912    -2.75   0.006    -.0023152    -.000384
 noeventyear |   -.013946   .0018283    -7.63   0.000    -.0175398   -.0103523
   evspline1 |  -3.53e-06   4.90e-07    -7.21   0.000    -4.49e-06   -2.57e-06
   evspline2 |   1.61e-06   2.28e-07     7.04   0.000     1.16e-06    2.06e-06
   evspline3 |  -1.94e-07   3.02e-08    -6.43   0.000    -2.54e-07   -1.35e-07
       _cons |  -1.059059   .1316282    -8.05   0.000    -1.317785   -.8003319
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe lnga0 inc1 llr inc1Xllr   llareab $CONTROLS $TIMEVARS, absorb(year) c
> luster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  18,    423) =   32892.06
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1565
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.1564
Number of clusters (ida)     =        424         Within R-sq.    =     0.1561
Number of clusters (idb)     =        424         Root MSE        =     0.1623

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.4391465   .1813019    -2.42   0.016    -.7955113   -.0827817
         llr |   .0658492   .0147681     4.46   0.000     .0368211    .0948773
    inc1Xllr |   1.779285   .4443849     4.00   0.000     .9058079    2.652763
     llareab |   .0069939   .0014521     4.82   0.000     .0041396    .0098482
      lldist |  -.0079566   .0016007    -4.97   0.000    -.0111028   -.0048103
      lneigh |   .0731537   .0111696     6.55   0.000      .051199    .0951085
   lcoastala |   .0155734   .0039884     3.90   0.000     .0077339     .023413
   lcoastalb |   .0029237   .0032663     0.90   0.371    -.0034964    .0093438
      llagea |   .1243325   .0152933     8.13   0.000     .0942722    .1543928
      llageb |    .122698    .015124     8.11   0.000     .0929705    .1524255
llnumneighsa |  -.0044233    .002525    -1.75   0.081    -.0093864    .0005398
llnumneighsb |  -.0062288   .0024444    -2.55   0.011    -.0110334   -.0014241
   llelevsda |  -.0024935   .0007358    -3.39   0.001    -.0039399   -.0010472
   llelevsdb |  -.0013686   .0004967    -2.76   0.006    -.0023449   -.0003922
 noeventyear |  -.0139353    .001827    -7.63   0.000    -.0175264   -.0103442
   evspline1 |  -3.53e-06   4.90e-07    -7.21   0.000    -4.49e-06   -2.57e-06
   evspline2 |   1.61e-06   2.28e-07     7.04   0.000     1.16e-06    2.06e-06
   evspline3 |  -1.94e-07   3.02e-08    -6.43   0.000    -2.54e-07   -1.35e-07
       _cons |  -1.057198   .1313785    -8.05   0.000    -1.315434   -.7989624
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS, absorb(year) clust
> er(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  25,    423) =    4706.21
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1619
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.1619
Number of clusters (ida)     =        424         Within R-sq.    =     0.1616
Number of clusters (idb)     =        424         Root MSE        =     0.1618

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .2202017   .2157419     1.02   0.308     -.203858    .6442613
inc1Xgrow~ra |   .0984593   .0274436     3.59   0.000     .0445165    .1524021
peaceXgro~ra |  -.0001229   .0005313    -0.23   0.817    -.0011672    .0009214
inc1Xgrow~ea |  -.0183094   .0314165    -0.58   0.560    -.0800614    .0434425
peaceXgro~ea |   .0021053   .0004163     5.06   0.000     .0012871    .0029235
inc1Xshri~rb |   .0897658   .0386031     2.33   0.021      .013888    .1656436
peaceXshr~rb |  -.0011445   .0006283    -1.82   0.069    -.0023795    .0000906
inc1Xshri~eb |   .0079352   .0420257     0.19   0.850    -.0746699    .0905404
peaceXshr~eb |   .0006919   .0004141     1.67   0.096    -.0001221    .0015059
     llareaa |   .0013303   .0008061     1.65   0.100    -.0002542    .0029148
     llareab |   .0035881   .0009566     3.75   0.000     .0017079    .0054683
      lldist |  -.0081851   .0016731    -4.89   0.000    -.0114736   -.0048965
      lneigh |   .0718587   .0110343     6.51   0.000     .0501698    .0935475
   lcoastala |   .0084105   .0035157     2.39   0.017     .0015001    .0153209
   lcoastalb |   .0030905   .0030023     1.03   0.304    -.0028109    .0089918
      llagea |   .1219119   .0151267     8.06   0.000     .0921789    .1516448
      llageb |   .1213944   .0151306     8.02   0.000     .0916538    .1511349
llnumneighsa |  -.0055776   .0024282    -2.30   0.022    -.0103505   -.0008047
llnumneighsb |  -.0066981   .0024109    -2.78   0.006     -.011437   -.0019593
   llelevsda |  -.0009429   .0004491    -2.10   0.036    -.0018257   -.0000601
   llelevsdb |  -.0014004   .0005101    -2.75   0.006    -.0024031   -.0003977
 noeventyear |  -.0138552   .0018262    -7.59   0.000    -.0174447   -.0102657
   evspline1 |  -3.51e-06   4.89e-07    -7.18   0.000    -4.48e-06   -2.55e-06
   evspline2 |   1.60e-06   2.28e-07     7.02   0.000     1.15e-06    2.05e-06
   evspline3 |  -1.95e-07   3.02e-08    -6.44   0.000    -2.54e-07   -1.35e-07
       _cons |  -.9747556   .1228861    -7.93   0.000    -1.216299   -.7332121
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m3

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS, absorb(year idd) c
> luster(idd2 ida idb)
(dropped 14680 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,293,989
Absorbing 2 HDFE groups                           F(  25,    395) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.4020
Number of clusters (idd2)    =     66,846         Adj R-squared   =     0.3767
Number of clusters (ida)     =        396         Within R-sq.    =     0.0539
Number of clusters (idb)     =        396         Root MSE        =     0.1384

                         (Std. err. adjusted for 396 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.1400709   .1921785    -0.73   0.467    -.5178914    .2377496
inc1Xgrow~ra |   .0643673   .0177156     3.63   0.000     .0295386     .099196
peaceXgro~ra |   .0006755   .0007444     0.91   0.365    -.0007879    .0021389
inc1Xgrow~ea |   .0029221   .0253123     0.12   0.908    -.0468415    .0526858
peaceXgro~ea |   .0021454     .00053     4.05   0.000     .0011034    .0031875
inc1Xshri~rb |   .0471888   .0162517     2.90   0.004     .0152382    .0791395
peaceXshr~rb |  -.0006104   .0006654    -0.92   0.360    -.0019186    .0006978
inc1Xshri~eb |   .0110613   .0175779     0.63   0.530    -.0234967    .0456193
peaceXshr~eb |  -.0002131   .0004216    -0.51   0.614    -.0010421    .0006158
     llareaa |  -.0084004   .0032092    -2.62   0.009    -.0147097   -.0020911
     llareab |   .0032281   .0027096     1.19   0.234    -.0020988    .0085551
      lldist |  -.0368514   .0063177    -5.83   0.000     -.049272   -.0244308
      lneigh |   .1025902   .0324897     3.16   0.002     .0387159    .1664645
   lcoastala |   .0129287   .0065125     1.99   0.048     .0001251    .0257322
   lcoastalb |  -.0183296   .0067433    -2.72   0.007    -.0315868   -.0050725
      llagea |   .1504085   .0252414     5.96   0.000     .1007843    .2000327
      llageb |   .1512288    .025414     5.95   0.000     .1012652    .2011924
llnumneighsa |   -.005771   .0034314    -1.68   0.093     -.012517     .000975
llnumneighsb |  -.0050606   .0051573    -0.98   0.327    -.0151998    .0050786
   llelevsda |  -.0025518   .0022118    -1.15   0.249    -.0069002    .0017965
   llelevsdb |  -.0045208   .0020421    -2.21   0.027    -.0085356    -.000506
 noeventyear |  -.0096219   .0014615    -6.58   0.000    -.0124952   -.0067486
   evspline1 |  -2.31e-06   3.78e-07    -6.11   0.000    -3.05e-06   -1.57e-06
   evspline2 |   9.77e-07   1.62e-07     6.05   0.000     6.59e-07    1.29e-06
   evspline3 |  -9.14e-08   1.69e-08    -5.40   0.000    -1.25e-07   -5.81e-08
       _cons |  -1.273646   .2668515    -4.77   0.000    -1.798273   -.7490196
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133652      133652           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m4

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads.ster", replace
file dyads.ster saved

. 
. esttab m1 m2 m3 m4 using "dyads.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains of State A and losses of State B \label{tab:d
> yadmain}") ///
> order (inc1 llr inc1Xllr $X  llareaa llareab) /// $CONTROLS) ///
> keep (inc1 llr inc1Xllr $X llareaa  llareab) /// $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE")
(output written to dyads.tex)

. 
. 
. // GENERATE TABLE A2
.  // BINARY DV BASED ON MAIN DYADIC MODELS
. 
. eststo clear

. global X "inc1Xgrowthwara peaceXgrowthwara inc1Xgrowthpeacea peaceXgrowthpeac
> ea inc1Xshrinkwarb peaceXshrinkwarb inc1Xshrinkpeaceb peaceXshrinkpeaceb"

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb"

. global TIMEVARS "noeventyear evspline*"

. 
. reghdfe nga10 inc1 llr  llareab $CONTROLS $TIMEVARS, absorb(year) cluster(idd
> 2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  17,    423) =      14.02
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2229
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.2229
Number of clusters (ida)     =        424         Within R-sq.    =     0.2224
Number of clusters (idb)     =        424         Root MSE        =     0.0451

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       nga10 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .1457083   .0257005     5.67   0.000     .0951917    .1962249
         llr |   .0174395   .0030982     5.63   0.000     .0113497    .0235292
     llareab |   .0017227   .0002872     6.00   0.000     .0011582    .0022872
      lldist |  -.0022734   .0003322    -6.84   0.000    -.0029265   -.0016203
      lneigh |   .0320794   .0038659     8.30   0.000     .0244806    .0396782
   lcoastala |   .0036922   .0010312     3.58   0.000     .0016652    .0057192
   lcoastalb |   .0012488   .0010123     1.23   0.218    -.0007409    .0032386
      llagea |   .0489647   .0051301     9.54   0.000     .0388811    .0590482
      llageb |   .0486635   .0051116     9.52   0.000     .0386161    .0587108
llnumneighsa |  -.0011185   .0005798    -1.93   0.054    -.0022581     .000021
llnumneighsb |  -.0013691   .0005758    -2.38   0.018     -.002501   -.0002373
   llelevsda |  -.0005956   .0001743    -3.42   0.001    -.0009381   -.0002531
   llelevsdb |  -.0002378   .0001399    -1.70   0.090    -.0005128    .0000372
 noeventyear |  -.0053839   .0005754    -9.36   0.000    -.0065148    -.004253
   evspline1 |  -1.35e-06   1.53e-07    -8.85   0.000    -1.65e-06   -1.05e-06
   evspline2 |   6.12e-07   7.10e-08     8.62   0.000     4.73e-07    7.52e-07
   evspline3 |  -7.29e-08   9.42e-09    -7.74   0.000    -9.15e-08   -5.44e-08
       _cons |  -.4168642    .044863    -9.29   0.000    -.5050463   -.3286821
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe nga10 inc1 llr inc1Xllr  llareab $CONTROLS $TIMEVARS, absorb(year) cl
> uster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  18,    423) = 7763766.80
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2230
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.2229
Number of clusters (ida)     =        424         Within R-sq.    =     0.2225
Number of clusters (idb)     =        424         Root MSE        =     0.0451

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       nga10 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .0207697   .0164735     1.26   0.208    -.0116105    .0531498
         llr |   .0173994   .0030971     5.62   0.000     .0113118    .0234871
    inc1Xllr |   .1391137    .046212     3.01   0.003     .0482799    .2299474
     llareab |   .0017231    .000288     5.98   0.000      .001157    .0022892
      lldist |  -.0022737   .0003351    -6.79   0.000    -.0029323   -.0016151
      lneigh |   .0320766   .0038659     8.30   0.000     .0244778    .0396753
   lcoastala |   .0036853   .0010357     3.56   0.000     .0016495    .0057211
   lcoastalb |   .0012485   .0010162     1.23   0.220    -.0007489     .003246
      llagea |   .0489524   .0051317     9.54   0.000     .0388657    .0590391
      llageb |   .0486516   .0051132     9.51   0.000     .0386011    .0587021
llnumneighsa |   -.001118   .0005987    -1.87   0.063    -.0022948    .0000588
llnumneighsb |  -.0013696   .0005834    -2.35   0.019    -.0025164   -.0002228
   llelevsda |  -.0005944   .0001744    -3.41   0.001    -.0009371   -.0002517
   llelevsdb |  -.0002393   .0001405    -1.70   0.089    -.0005156    .0000369
 noeventyear |  -.0053831   .0005755    -9.35   0.000    -.0065142    -.004252
   evspline1 |  -1.35e-06   1.53e-07    -8.85   0.000    -1.65e-06   -1.05e-06
   evspline2 |   6.12e-07   7.10e-08     8.62   0.000     4.73e-07    7.52e-07
   evspline3 |  -7.29e-08   9.42e-09    -7.74   0.000    -9.15e-08   -5.44e-08
       _cons |  -.4167188   .0448805    -9.29   0.000    -.5049354   -.3285021
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe nga10 inc1 $X llareaa llareab $CONTROLS $TIMEVARS, absorb(year) clust
> er(idd2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  25,    423) =      27.85
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2242
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.2241
Number of clusters (ida)     =        424         Within R-sq.    =     0.2237
Number of clusters (idb)     =        424         Root MSE        =     0.0450

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       nga10 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .0609051   .0301731     2.02   0.044     .0015972    .1202131
inc1Xgrow~ra |   .0083916   .0042349     1.98   0.048     .0000676    .0167157
peaceXgro~ra |  -.0004221   .0001745    -2.42   0.016    -.0007652    -.000079
inc1Xgrow~ea |    -.00395   .0045421    -0.87   0.385     -.012878     .004978
peaceXgro~ea |   .0008824   .0001596     5.53   0.000     .0005686    .0011962
inc1Xshri~rb |   .0088163   .0043892     2.01   0.045     .0001891    .0174436
peaceXshr~rb |  -.0005888   .0002226    -2.65   0.008    -.0010263   -.0001513
inc1Xshri~eb |   .0056453     .00476     1.19   0.236    -.0037108    .0150014
peaceXshr~eb |   .0004102   .0001501     2.73   0.007     .0001152    .0007052
     llareaa |   .0002244   .0002066     1.09   0.278    -.0001816    .0006305
     llareab |   .0007982   .0002146     3.72   0.000     .0003765      .00122
      lldist |  -.0023665   .0003444    -6.87   0.000    -.0030435   -.0016895
      lneigh |   .0314794   .0038093     8.26   0.000     .0239919     .038967
   lcoastala |   .0022465   .0010487     2.14   0.033     .0001853    .0043078
   lcoastalb |   .0014306   .0009559     1.50   0.135    -.0004482    .0033095
      llagea |   .0486595   .0051269     9.49   0.000     .0385821     .058737
      llageb |   .0486356    .005147     9.45   0.000     .0385188    .0587525
llnumneighsa |  -.0015132   .0006015    -2.52   0.012    -.0026954    -.000331
llnumneighsb |  -.0016166   .0005666    -2.85   0.005    -.0027303   -.0005029
   llelevsda |  -.0002082   .0001316    -1.58   0.114    -.0004669    .0000505
   llelevsdb |  -.0002726   .0001371    -1.99   0.047    -.0005421   -3.17e-06
 noeventyear |  -.0053923   .0005789    -9.31   0.000    -.0065302   -.0042544
   evspline1 |  -1.35e-06   1.53e-07    -8.83   0.000    -1.65e-06   -1.05e-06
   evspline2 |   6.14e-07   7.13e-08     8.61   0.000     4.74e-07    7.54e-07
   evspline3 |  -7.34e-08   9.46e-09    -7.76   0.000    -9.20e-08   -5.49e-08
       _cons |  -.3968144   .0437699    -9.07   0.000     -.482848   -.3107809
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m3

. 
. reghdfe nga10 inc1 $X llareaa llareab $CONTROLS $TIMEVARS, absorb(year idd) c
> luster(idd2 ida idb)
(dropped 14680 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,293,989
Absorbing 2 HDFE groups                           F(  25,    395) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.4542
Number of clusters (idd2)    =     66,846         Adj R-squared   =     0.4312
Number of clusters (ida)     =        396         Within R-sq.    =     0.0816
Number of clusters (idb)     =        396         Root MSE        =     0.0385

                         (Std. err. adjusted for 396 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       nga10 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.0273122   .0282187    -0.97   0.334    -.0827898    .0281653
inc1Xgrow~ra |    .005336   .0031578     1.69   0.092    -.0008722    .0115442
peaceXgro~ra |  -.0001148   .0002495    -0.46   0.646    -.0006053    .0003757
inc1Xgrow~ea |   .0014892   .0042097     0.35   0.724     -.006787    .0097655
peaceXgro~ea |   .0008335   .0001987     4.20   0.000     .0004429    .0012241
inc1Xshri~rb |   .0033909   .0018146     1.87   0.062    -.0001767    .0069584
peaceXshr~rb |  -.0002586   .0002594    -1.00   0.319    -.0007687    .0002514
inc1Xshri~eb |   .0052235   .0016769     3.11   0.002     .0019266    .0085203
peaceXshr~eb |   .0000921   .0001465     0.63   0.530    -.0001959    .0003802
     llareaa |  -.0028296   .0008711    -3.25   0.001    -.0045422    -.001117
     llareab |  -.0000788   .0007301    -0.11   0.914    -.0015141    .0013565
      lldist |  -.0104604   .0014537    -7.20   0.000    -.0133183   -.0076024
      lneigh |   .0457262   .0104805     4.36   0.000     .0251218    .0663307
   lcoastala |   .0033902   .0021564     1.57   0.117    -.0008492    .0076297
   lcoastalb |  -.0025199   .0017827    -1.41   0.158    -.0060248    .0009849
      llagea |   .0597763   .0091771     6.51   0.000     .0417343    .0778183
      llageb |   .0601883   .0092605     6.50   0.000     .0419822    .0783943
llnumneighsa |   -.001676   .0008875    -1.89   0.060    -.0034209    .0000689
llnumneighsb |  -.0011355   .0010076    -1.13   0.260    -.0031163    .0008454
   llelevsda |  -.0008261   .0007516    -1.10   0.272    -.0023038    .0006516
   llelevsdb |  -.0010364   .0007329    -1.41   0.158    -.0024772    .0004045
 noeventyear |  -.0039264   .0005213    -7.53   0.000    -.0049513   -.0029014
   evspline1 |  -9.24e-07   1.32e-07    -7.02   0.000    -1.18e-06   -6.65e-07
   evspline2 |   3.92e-07   5.62e-08     6.97   0.000     2.81e-07    5.02e-07
   evspline3 |  -3.71e-08   5.93e-09    -6.25   0.000    -4.88e-08   -2.54e-08
       _cons |  -.5210801   .0971106    -5.37   0.000    -.7119985   -.3301618
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133652      133652           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m4

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads_binary.ster", replace
file dyads_binary.ster saved

. 
. esttab m1 m2 m3 m4 using "dyads_binary.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains of State A and losses of State B (binary Dv) 
> \label{tab:dyadbinary}") ///
> order (inc1 llr inc1Xllr $X llareaa  llareab ) ///
> keep (inc1 llr inc1Xllr $X llareaa  llareab ) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE")
(output written to dyads_binary.tex)

.           
. 
. // GENERATE TABLE A3
. // ROBUSTNESS ANALYSIS OF URBAN POPULATION AND PERIPHERAL POSITION IN EUROPE 
>        
. eststo clear

. global X "inc1Xgrowthwara peaceXgrowthwara inc1Xgrowthpeacea peaceXgrowthpeac
> ea inc1Xshrinkwarb peaceXshrinkwarb inc1Xshrinkpeaceb peaceXshrinkpeaceb"

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb"

. global CONTROLS2 "lurbana lurbanb lcentrala lcentralb"

. global TIMEVARS "noeventyear evspline*"

. 
. reghdfe lnga0 inc1 llr  llareab $CONTROLS $CONTROLS2 $TIMEVARS, absorb(year) 
> cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  2,832,133
Absorbing 1 HDFE group                            F(  21,    399) =       7.96
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1616
Number of clusters (idd2)    =     65,349         Adj R-squared   =     0.1616
Number of clusters (ida)     =        400         Within R-sq.    =     0.1613
Number of clusters (idb)     =        400         Root MSE        =     0.1746

                         (Std. err. adjusted for 400 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   1.143391   .2120865     5.39   0.000     .7264444    1.560338
         llr |   .0833155   .0184314     4.52   0.000     .0470807    .1195503
     llareab |   .0082275   .0016967     4.85   0.000     .0048919    .0115632
      lldist |  -.0088295   .0017848    -4.95   0.000    -.0123383   -.0053207
      lneigh |   .0760248   .0116218     6.54   0.000     .0531772    .0988725
   lcoastala |   .0150397   .0039845     3.77   0.000     .0072065    .0228729
   lcoastalb |   .0026356   .0034663     0.76   0.447    -.0041789      .00945
      llagea |   .1292134   .0153577     8.41   0.000     .0990212    .1594056
      llageb |   .1269384   .0151723     8.37   0.000     .0971107     .156766
llnumneighsa |  -.0056436   .0027538    -2.05   0.041    -.0110574   -.0002299
llnumneighsb |  -.0071776   .0027643    -2.60   0.010     -.012612   -.0017433
   llelevsda |  -.0029841   .0008713    -3.42   0.001     -.004697   -.0012712
   llelevsdb |  -.0014799   .0005489    -2.70   0.007    -.0025591   -.0004007
     lurbana |  -.0054604   .0031479    -1.73   0.084     -.011649    .0007282
     lurbanb |  -.0034799   .0025072    -1.39   0.166     -.008409    .0014491
   lcentrala |   .0032736   .0010456     3.13   0.002     .0012181    .0053291
   lcentralb |   .0009648     .00135     0.71   0.475    -.0016892    .0036188
 noeventyear |  -.0147461   .0018878    -7.81   0.000    -.0184574   -.0110348
   evspline1 |  -3.76e-06   5.12e-07    -7.34   0.000    -4.76e-06   -2.75e-06
   evspline2 |   1.71e-06   2.40e-07     7.14   0.000     1.24e-06    2.19e-06
   evspline3 |  -2.08e-07   3.22e-08    -6.46   0.000    -2.72e-07   -1.45e-07
       _cons |  -1.103198   .1320493    -8.35   0.000    -1.362798   -.8435992
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe lnga0 inc1 llr inc1Xllr   llareab $CONTROLS $CONTROLS2 $TIMEVARS, abs
> orb(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  2,832,133
Absorbing 1 HDFE group                            F(  22,    399) =    6961.78
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1625
Number of clusters (idd2)    =     65,349         Adj R-squared   =     0.1625
Number of clusters (ida)     =        400         Within R-sq.    =     0.1622
Number of clusters (idb)     =        400         Root MSE        =     0.1746

                         (Std. err. adjusted for 400 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.4404498   .1796495    -2.45   0.015    -.7936276    -.087272
         llr |   .0826219    .018317     4.51   0.000     .0466119    .1186319
    inc1Xllr |   1.763575   .4402669     4.01   0.000     .8980425    2.629108
     llareab |   .0082278   .0017044     4.83   0.000     .0048771    .0115786
      lldist |  -.0088335   .0018101    -4.88   0.000    -.0123919    -.005275
      lneigh |   .0759897   .0116903     6.50   0.000     .0530074    .0989721
   lcoastala |   .0149569   .0041078     3.64   0.000     .0068812    .0230326
   lcoastalb |   .0026262   .0035105     0.75   0.455    -.0042753    .0095276
      llagea |   .1290396   .0153339     8.42   0.000     .0988943    .1591849
      llageb |   .1267813   .0151537     8.37   0.000     .0969902    .1565723
llnumneighsa |  -.0056258   .0028785    -1.95   0.051    -.0112847     .000033
llnumneighsb |  -.0071862   .0027838    -2.58   0.010    -.0126589   -.0017136
   llelevsda |  -.0029662   .0008662    -3.42   0.001     -.004669   -.0012634
   llelevsdb |  -.0014985   .0005548    -2.70   0.007    -.0025893   -.0004078
     lurbana |  -.0051808   .0031212    -1.66   0.098    -.0113168    .0009552
     lurbanb |   -.003562   .0025751    -1.38   0.167    -.0086244    .0015004
   lcentrala |   .0032494   .0010593     3.07   0.002     .0011669    .0053319
   lcentralb |    .000962      .0016     0.60   0.548    -.0021835    .0041074
 noeventyear |  -.0147348   .0018865    -7.81   0.000    -.0184435   -.0110262
   evspline1 |  -3.75e-06   5.12e-07    -7.34   0.000    -4.76e-06   -2.75e-06
   evspline2 |   1.71e-06   2.40e-07     7.14   0.000     1.24e-06    2.18e-06
   evspline3 |  -2.08e-07   3.22e-08    -6.46   0.000    -2.72e-07   -1.45e-07
       _cons |   -1.10107   .1317852    -8.36   0.000     -1.36015   -.8419901
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $CONTROLS2 $TIMEVARS, absorb(
> year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  2,832,133
Absorbing 1 HDFE group                            F(  29,    399) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.1676
Number of clusters (idd2)    =     65,349         Adj R-squared   =     0.1676
Number of clusters (ida)     =        400         Within R-sq.    =     0.1673
Number of clusters (idb)     =        400         Root MSE        =     0.1740

                         (Std. err. adjusted for 400 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .2168102   .2151231     1.01   0.314    -.2061062    .6397265
inc1Xgrow~ra |   .0977436   .0273392     3.58   0.000     .0439968    .1514904
peaceXgro~ra |  -.0001889   .0005749    -0.33   0.743    -.0013191    .0009413
inc1Xgrow~ea |   -.018492   .0313448    -0.59   0.556    -.0801136    .0431297
peaceXgro~ea |   .0021602   .0004427     4.88   0.000     .0012899    .0030306
inc1Xshri~rb |   .0891298   .0384496     2.32   0.021     .0135407    .1647189
peaceXshr~rb |  -.0012638   .0006778    -1.86   0.063    -.0025963    .0000687
inc1Xshri~eb |   .0078477   .0418451     0.19   0.851    -.0744168    .0901121
peaceXshr~eb |   .0006977   .0004437     1.57   0.117    -.0001745      .00157
     llareaa |   .0015684   .0008989     1.74   0.082    -.0001988    .0033355
     llareab |   .0039603   .0010642     3.72   0.000     .0018682    .0060524
      lldist |  -.0090238   .0018795    -4.80   0.000    -.0127188   -.0053289
      lneigh |    .074921   .0115294     6.50   0.000     .0522551     .097587
   lcoastala |   .0087609   .0037624     2.33   0.020     .0013643    .0161575
   lcoastalb |   .0027839   .0032142     0.87   0.387    -.0035351    .0091028
      llagea |   .1263334   .0151626     8.33   0.000     .0965248     .156142
      llageb |    .125497   .0151988     8.26   0.000     .0956173    .1553766
llnumneighsa |  -.0065108   .0027584    -2.36   0.019    -.0119336   -.0010881
llnumneighsb |  -.0077047   .0027578    -2.79   0.005    -.0131263   -.0022832
   llelevsda |  -.0010321   .0004988    -2.07   0.039    -.0020127   -.0000515
   llelevsdb |  -.0014563   .0005548    -2.62   0.009     -.002547   -.0003656
     lurbana |  -.0052217   .0023815    -2.19   0.029    -.0099035   -.0005399
     lurbanb |  -.0034246   .0025061    -1.37   0.173    -.0083515    .0015023
   lcentrala |   .0018855   .0011862     1.59   0.113    -.0004465    .0042175
   lcentralb |   .0008586    .001365     0.63   0.530    -.0018249    .0035422
 noeventyear |   -.014654   .0018886    -7.76   0.000    -.0183669   -.0109411
   evspline1 |  -3.74e-06   5.12e-07    -7.30   0.000    -4.74e-06   -2.73e-06
   evspline2 |   1.71e-06   2.40e-07     7.12   0.000     1.24e-06    2.18e-06
   evspline3 |  -2.08e-07   3.21e-08    -6.47   0.000    -2.71e-07   -1.45e-07
       _cons |  -1.000113   .1218845    -8.21   0.000    -1.239729    -.760497
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m3

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $CONTROLS2 $TIMEVARS, absorb(
> year idd) cluster(idd2 ida idb)
(dropped 14447 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  2,817,686
Absorbing 2 HDFE groups                           F(  29,    369) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.4041
Number of clusters (idd2)    =     58,110         Adj R-squared   =     0.3784
Number of clusters (ida)     =        370         Within R-sq.    =     0.0559
Number of clusters (idb)     =        370         Root MSE        =     0.1491

                         (Std. err. adjusted for 370 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.1373785   .1914443    -0.72   0.473    -.5138371    .2390801
inc1Xgrow~ra |    .064208   .0177074     3.63   0.000     .0293879    .0990281
peaceXgro~ra |   .0006749   .0007937     0.85   0.396    -.0008859    .0022358
inc1Xgrow~ea |   .0026344   .0251876     0.10   0.917    -.0468947    .0521636
peaceXgro~ea |   .0021274   .0005557     3.83   0.000     .0010347    .0032201
inc1Xshri~rb |   .0469117   .0162401     2.89   0.004     .0149771    .0788464
peaceXshr~rb |  -.0006319    .000702    -0.90   0.369    -.0020123    .0007485
inc1Xshri~eb |   .0110313   .0176189     0.63   0.532    -.0236147    .0456773
peaceXshr~eb |  -.0001952   .0004572    -0.43   0.670    -.0010942    .0007038
     llareaa |   -.007958   .0033677    -2.36   0.019    -.0145803   -.0013357
     llareab |   .0042828   .0028894     1.48   0.139    -.0013989    .0099645
      lldist |  -.0375902   .0066351    -5.67   0.000    -.0506376   -.0245427
      lneigh |   .1054908   .0340804     3.10   0.002     .0384748    .1725069
   lcoastala |   .0132812   .0068418     1.94   0.053    -.0001726    .0267349
   lcoastalb |  -.0202811   .0071201    -2.85   0.005    -.0342822     -.00628
      llagea |   .1597829    .026231     6.09   0.000     .1082019    .2113639
      llageb |   .1604683   .0263873     6.08   0.000     .1085799    .2123568
llnumneighsa |  -.0064927   .0037507    -1.73   0.084    -.0138681    .0008827
llnumneighsb |  -.0055713   .0055967    -1.00   0.320    -.0165768    .0054342
   llelevsda |  -.0015269   .0021652    -0.71   0.481    -.0057846    .0027309
   llelevsdb |  -.0034493   .0016828    -2.05   0.041    -.0067585   -.0001401
     lurbana |   -.001525   .0061486    -0.25   0.804    -.0136157    .0105657
     lurbanb |   .0013212   .0058978     0.22   0.823    -.0102764    .0129188
   lcentrala |   .0008974   .0008679     1.03   0.302    -.0008093    .0026041
   lcentralb |   .0007071    .001116     0.63   0.527    -.0014875    .0029017
 noeventyear |   -.010281   .0015336    -6.70   0.000    -.0132967   -.0072654
   evspline1 |  -2.48e-06   3.98e-07    -6.23   0.000    -3.26e-06   -1.69e-06
   evspline2 |   1.05e-06   1.70e-07     6.15   0.000     7.12e-07    1.38e-06
   evspline3 |  -9.77e-08   1.80e-08    -5.42   0.000    -1.33e-07   -6.23e-08
       _cons |  -1.377106   .2793714    -4.93   0.000    -1.926466   -.8277464
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    116179      116179           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m4

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyadsurban.ster", replace
file dyadsurban.ster saved

. 
. 
. esttab m1 m2 m3 m4 using "dyadsurban.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains of State A and losses of State B \label{tab:d
> yad-urb-centr}") ///
> order (inc1 llr inc1Xllr $X llareaa  llareab $CONTROLS2) ///
> keep (inc1 llr inc1Xllr $X llareaa  llareab $CONTROLS2) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE") 
>      
(output written to dyadsurban.tex)

.           
.           
.           
. // GENERATE TABLE A4      
. // DYADIC MODELS WITHOUT WAR VARIABLES
. 
. eststo clear

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb"

. global TIMEVARS "noeventyear evspline*"

. 
. reghdfe lnga0  llr  llareab $CONTROLS $TIMEVARS, absorb(year) cluster(idd2 id
> a idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  16,    423) =       7.22
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1321
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.1321
Number of clusters (ida)     =        424         Within R-sq.    =     0.1317
Number of clusters (idb)     =        424         Root MSE        =     0.1647

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         llr |   .0792758   .0183775     4.31   0.000     .0431532    .1153984
     llareab |   .0082494   .0017032     4.84   0.000     .0049015    .0115973
      lldist |   -.009031   .0018827    -4.80   0.000    -.0127315   -.0053305
      lneigh |   .0711945   .0108252     6.58   0.000     .0499166    .0924723
   lcoastala |   .0188825   .0045787     4.12   0.000     .0098826    .0278824
   lcoastalb |   .0051764   .0032991     1.57   0.117    -.0013083    .0116612
      llagea |   .1303159   .0166339     7.83   0.000     .0976205    .1630114
      llageb |   .1286068   .0164288     7.83   0.000     .0963145    .1608992
llnumneighsa |  -.0048488   .0025138    -1.93   0.054    -.0097898    .0000923
llnumneighsb |  -.0066335   .0024702    -2.69   0.008    -.0114889   -.0017781
   llelevsda |   -.003044   .0008942    -3.40   0.001    -.0048016   -.0012863
   llelevsdb |  -.0016335   .0005283    -3.09   0.002     -.002672   -.0005951
 noeventyear |  -.0144456   .0019512    -7.40   0.000    -.0182808   -.0106103
   evspline1 |  -3.65e-06   5.18e-07    -7.04   0.000    -4.66e-06   -2.63e-06
   evspline2 |   1.66e-06   2.41e-07     6.89   0.000     1.19e-06    2.13e-06
   evspline3 |  -2.00e-07   3.15e-08    -6.34   0.000    -2.62e-07   -1.38e-07
       _cons |  -1.119643   .1444212    -7.75   0.000    -1.403516   -.8357707
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe lnga0 inc1 llgrowtha llshrinkb llareaa llareab $CONTROLS $TIMEVARS, a
> bsorb(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  19,    423) =       7.79
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1553
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.1553
Number of clusters (ida)     =        424         Within R-sq.    =     0.1550
Number of clusters (idb)     =        424         Root MSE        =     0.1625

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   1.163597   .2148646     5.42   0.000     .7412618    1.585932
   llgrowtha |   .0021137    .000403     5.24   0.000     .0013216    .0029059
   llshrinkb |   .0005548   .0004656     1.19   0.234    -.0003604      .00147
     llareaa |   .0011948   .0007875     1.52   0.130    -.0003531    .0027427
     llareab |   .0032417   .0009358     3.46   0.001     .0014023    .0050811
      lldist |  -.0082083   .0016693    -4.92   0.000    -.0114895    -.004927
      lneigh |   .0715443   .0112346     6.37   0.000     .0494616     .093627
   lcoastala |   .0079563   .0036259     2.19   0.029     .0008292    .0150833
   lcoastalb |   .0020625    .003164     0.65   0.515    -.0041566    .0082816
      llagea |   .1232183   .0152632     8.07   0.000     .0932171    .1532195
      llageb |   .1226385   .0152477     8.04   0.000     .0926679    .1526092
llnumneighsa |   -.005712   .0025018    -2.28   0.023    -.0106295   -.0007944
llnumneighsb |  -.0066794   .0025137    -2.66   0.008    -.0116203   -.0017384
   llelevsda |  -.0009003   .0004418    -2.04   0.042    -.0017687   -.0000319
   llelevsdb |  -.0012446   .0004884    -2.55   0.011    -.0022046   -.0002845
 noeventyear |  -.0139753   .0018397    -7.60   0.000    -.0175914   -.0103593
   evspline1 |  -3.54e-06   4.92e-07    -7.19   0.000    -4.51e-06   -2.57e-06
   evspline2 |   1.61e-06   2.30e-07     7.03   0.000     1.16e-06    2.07e-06
   evspline3 |  -1.95e-07   3.03e-08    -6.45   0.000    -2.55e-07   -1.36e-07
       _cons |  -.9834322   .1235753    -7.96   0.000     -1.22633    -.740534
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe lnga0 inc1 llgrowtha llshrinkb llareaa llareab $CONTROLS $TIMEVARS, a
> bsorb(year idd) cluster(idd2 ida idb)
(dropped 14680 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  3,293,989
Absorbing 2 HDFE groups                           F(  19,    395) =       8.36
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3996
Number of clusters (idd2)    =     66,846         Adj R-squared   =     0.3742
Number of clusters (ida)     =        396         Within R-sq.    =     0.0501
Number of clusters (idb)     =        396         Root MSE        =     0.1386

                         (Std. err. adjusted for 396 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .5505532   .1239564     4.44   0.000     .3068565    .7942499
   llgrowtha |   .0023558   .0005333     4.42   0.000     .0013073    .0034043
   llshrinkb |  -.0000988   .0004197    -0.24   0.814    -.0009239    .0007264
     llareaa |  -.0078724   .0035103    -2.24   0.025    -.0147736   -.0009711
     llareab |   .0034902   .0027628     1.26   0.207    -.0019415    .0089218
      lldist |  -.0378742   .0063668    -5.95   0.000    -.0503912   -.0253573
      lneigh |   .0992069   .0319509     3.10   0.002     .0363919    .1620219
   lcoastala |   .0144647    .007038     2.06   0.041     .0006282    .0283013
   lcoastalb |  -.0181779   .0066754    -2.72   0.007    -.0313018   -.0050541
      llagea |   .1515587   .0254585     5.95   0.000     .1015076    .2016098
      llageb |   .1523939   .0256093     5.95   0.000     .1020464    .2027415
llnumneighsa |  -.0053465   .0035454    -1.51   0.132    -.0123166    .0016237
llnumneighsb |   -.005232   .0051214    -1.02   0.308    -.0153005    .0048365
   llelevsda |  -.0030329   .0023379    -1.30   0.195    -.0076291    .0015633
   llelevsdb |  -.0045436    .002071    -2.19   0.029    -.0086151   -.0004721
 noeventyear |  -.0097291   .0014755    -6.59   0.000    -.0126299   -.0068283
   evspline1 |  -2.33e-06   3.81e-07    -6.11   0.000    -3.08e-06   -1.58e-06
   evspline2 |   9.85e-07   1.63e-07     6.04   0.000     6.64e-07    1.30e-06
   evspline3 |  -9.22e-08   1.70e-08    -5.41   0.000    -1.26e-07   -5.86e-08
       _cons |  -1.281467   .2687411    -4.77   0.000    -1.809809   -.7531257
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133652      133652           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m3

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyad_nowar.ster", replace
file dyad_nowar.ster saved

. 
. esttab m1 m2 m3 using "dyads_nowar.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains of State A and losses of State B without war 
> variables \label{tab:dyad:nowar}") ///
> order (llr   llareaa llareab llgrowtha llshrinkb $CONTROLS) ///
> keep (llr   llareaa llareab llgrowtha llshrinkb $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE")
(output written to dyads_nowar.tex)

.           
. 
. // GENERATE TABLE A6              
. // ROBUSTNESS TO CHANGES IN TECHNOLOGY (1650 cutoff)
. 
. eststo clear

. global X "inc1Xgrowthwara peaceXgrowthwara inc1Xgrowthpeacea peaceXgrowthpeac
> ea inc1Xshrinkwarb peaceXshrinkwarb inc1Xshrinkpeaceb peaceXshrinkpeaceb"

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb"

. global CONTROLS2 "lurbana lurbanb lcentrala lcentralb"

. global TIMEVARS "noeventyear evspline*"

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS if year<1650, absor
> b(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  1,802,569
Absorbing 1 HDFE group                            F(  25,    367) =    4931.64
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1815
Number of clusters (idd2)    =     59,831         Adj R-squared   =     0.1815
Number of clusters (ida)     =        368         Within R-sq.    =     0.1813
Number of clusters (idb)     =        368         Root MSE        =     0.1586

                         (Std. err. adjusted for 368 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .5290811   .1913268     2.77   0.006     .1528467    .9053154
inc1Xgrow~ra |   .1093672   .0348401     3.14   0.002     .0408558    .1778785
peaceXgro~ra |    .001865   .0010187     1.83   0.068    -.0001382    .0038683
inc1Xgrow~ea |   .0061943   .0473327     0.13   0.896    -.0868829    .0992716
peaceXgro~ea |   .0012389   .0003728     3.32   0.001     .0005058    .0019719
inc1Xshri~rb |   .0485814   .0451763     1.08   0.283    -.0402555    .1374182
peaceXshr~rb |  -.0002599   .0005319    -0.49   0.625    -.0013059     .000786
inc1Xshri~eb |  -.0448637   .0453136    -0.99   0.323    -.1339705    .0442431
peaceXshr~eb |   .0005213   .0003445     1.51   0.131    -.0001563    .0011988
     llareaa |   .0017527   .0008694     2.02   0.045      .000043    .0034624
     llareab |   .0036086   .0009749     3.70   0.000     .0016916    .0055257
      lldist |  -.0074707   .0016566    -4.51   0.000    -.0107283   -.0042131
      lneigh |   .0637525   .0106911     5.96   0.000     .0427291     .084776
   lcoastala |   .0071411   .0030787     2.32   0.021      .001087    .0131952
   lcoastalb |   .0020326   .0029795     0.68   0.496    -.0038264    .0078916
      llagea |   .2480637   .0326638     7.59   0.000      .183832    .3122953
      llageb |   .2482576   .0328133     7.57   0.000     .1837319    .3127833
llnumneighsa |  -.0052052   .0026399    -1.97   0.049    -.0103965    -.000014
llnumneighsb |  -.0063641    .002537    -2.51   0.013     -.011353   -.0013752
   llelevsda |  -.0008826   .0004757    -1.86   0.064    -.0018179    .0000528
   llelevsdb |  -.0013785   .0005201    -2.65   0.008    -.0024012   -.0003558
 noeventyear |  -.0206546   .0027138    -7.61   0.000    -.0259911    -.015318
   evspline1 |  -5.24e-06   7.18e-07    -7.30   0.000    -6.66e-06   -3.83e-06
   evspline2 |   3.05e-06   4.34e-07     7.03   0.000     2.20e-06    3.91e-06
   evspline3 |  -1.06e-06   1.67e-07    -6.37   0.000    -1.39e-06   -7.36e-07
       _cons |  -2.096349   .2785472    -7.53   0.000    -2.644097     -1.5486
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        31           0          31     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS if year>=1650, abso
> rb(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  1,506,100
Absorbing 1 HDFE group                            F(  25,    316) =   16422.57
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1738
Number of clusters (idd2)    =     46,433         Adj R-squared   =     0.1738
Number of clusters (ida)     =        317         Within R-sq.    =     0.1734
Number of clusters (idb)     =        317         Root MSE        =     0.1623

                         (Std. err. adjusted for 317 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.6622221   .5570584    -1.19   0.235    -1.758234    .4337899
inc1Xgrow~ra |   .1295617   .0442074     2.93   0.004     .0425836    .2165397
peaceXgro~ra |  -.0004144   .0006353    -0.65   0.515    -.0016643    .0008355
inc1Xgrow~ea |   -.017182   .0427292    -0.40   0.688    -.1012517    .0668876
peaceXgro~ea |   .0022312    .000523     4.27   0.000     .0012022    .0032601
inc1Xshri~rb |   .1116428    .029434     3.79   0.000     .0537315    .1695541
peaceXshr~rb |  -.0017722   .0008143    -2.18   0.030    -.0033744   -.0001699
inc1Xshri~eb |   .0644439   .0514722     1.25   0.211    -.0368276    .1657154
peaceXshr~eb |   .0002644   .0005641     0.47   0.640    -.0008455    .0013743
     llareaa |   .0001023    .001127     0.09   0.928     -.002115    .0023197
     llareab |    .003471   .0011958     2.90   0.004     .0011182    .0058238
      lldist |  -.0080796   .0016338    -4.95   0.000    -.0112941   -.0048651
      lneigh |   .0682828   .0114481     5.96   0.000     .0457585     .090807
   lcoastala |   .0103404   .0047372     2.18   0.030     .0010199    .0196609
   lcoastalb |   .0063214   .0039832     1.59   0.114    -.0015155    .0141583
      llagea |   .0876033   .0110085     7.96   0.000     .0659441    .1092625
      llageb |   .0865881   .0108999     7.94   0.000     .0651427    .1080336
llnumneighsa |  -.0045691   .0025935    -1.76   0.079    -.0096717    .0005336
llnumneighsb |  -.0059035   .0025477    -2.32   0.021    -.0109161   -.0008908
   llelevsda |  -.0005283   .0006025    -0.88   0.381    -.0017137    .0006571
   llelevsdb |  -.0013558   .0006339    -2.14   0.033    -.0026031   -.0001086
 noeventyear |  -.0130819   .0017917    -7.30   0.000     -.016607   -.0095567
   evspline1 |  -3.49e-06   5.06e-07    -6.89   0.000    -4.48e-06   -2.49e-06
   evspline2 |   1.60e-06   2.38e-07     6.72   0.000     1.13e-06    2.07e-06
   evspline3 |  -1.91e-07   3.12e-08    -6.11   0.000    -2.52e-07   -1.29e-07
       _cons |  -.6560305    .086373    -7.60   0.000    -.8259693   -.4860917
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        29           0          29     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads_milrevol.ster", replace
file dyads_milrevol.ster saved

. 
. esttab m1 m2   using "dyads_milrevol.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains and losses before and after 1650 \label{tab:m
> ilrevol}") ///
> order (inc1 $X  llareaa llareab $CONTROLS) ///
> keep (inc1 $X  llareaa llareab $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE") 
>      
(output written to dyads_milrevol.tex)

.  
.           
.           
. // GENERATE TABLE A7      
. // ROBUSTNESS TEST WITHOUT RUSSIA AND PRUSSIA
. 
. eststo clear

. global X "inc1Xgrowthwara peaceXgrowthwara inc1Xgrowthpeacea peaceXgrowthpeac
> ea inc1Xshrinkwarb peaceXshrinkwarb inc1Xshrinkpeaceb peaceXshrinkpeaceb"

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb  "

. global TIMEVARS "noeventyear evspline*"

. global EXCLUDE "if namea!="Muscovy" & nameb!="Muscovy & namea!="Hohenzollern"
>  & nameb!="Hohenzollern"

. 
. reghdfe lnga0 inc1 llr  llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb(year) cl
> uster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,294,702
Absorbing 1 HDFE group                            F(  17,    422) =       7.53
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1518
Number of clusters (idd2)    =     74,200         Adj R-squared   =     0.1517
Number of clusters (ida)     =        423         Within R-sq.    =     0.1514
Number of clusters (idb)     =        424         Root MSE        =     0.1584

                         (Std. err. adjusted for 423 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   1.080467   .1941313     5.57   0.000     .6988827    1.462052
         llr |   .0611541   .0132812     4.60   0.000     .0350486    .0872597
     llareab |   .0063881   .0012589     5.07   0.000     .0039137    .0088625
      lldist |  -.0073613   .0013838    -5.32   0.000    -.0100814   -.0046413
      lneigh |   .0725159   .0109362     6.63   0.000     .0510196    .0940122
   lcoastala |   .0153248   .0038167     4.02   0.000     .0078226     .022827
   lcoastalb |   .0032768    .003156     1.04   0.300    -.0029266    .0094801
      llagea |   .1215669   .0149663     8.12   0.000     .0921492    .1509847
      llageb |   .1200489   .0148134     8.10   0.000     .0909318    .1491661
llnumneighsa |  -.0036863   .0021676    -1.70   0.090     -.007947    .0005743
llnumneighsb |  -.0053872   .0021777    -2.47   0.014    -.0096676   -.0011067
   llelevsda |  -.0022569   .0006689    -3.37   0.001    -.0035718   -.0009421
   llelevsdb |  -.0011665   .0004338    -2.69   0.007    -.0020191   -.0003138
 noeventyear |  -.0136153   .0017952    -7.58   0.000     -.017144   -.0100867
   evspline1 |  -3.45e-06   4.81e-07    -7.16   0.000    -4.39e-06   -2.50e-06
   evspline2 |   1.57e-06   2.25e-07     6.99   0.000     1.13e-06    2.01e-06
   evspline3 |  -1.90e-07   2.97e-08    -6.38   0.000    -2.48e-07   -1.31e-07
       _cons |  -1.034893    .128956    -8.03   0.000    -1.288369   -.7814166
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe lnga0 inc1 llr inc1Xllr  llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb
> (year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,294,702
Absorbing 1 HDFE group                            F(  18,    422) =       7.25
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1523
Number of clusters (idd2)    =     74,200         Adj R-squared   =     0.1523
Number of clusters (ida)     =        423         Within R-sq.    =     0.1519
Number of clusters (idb)     =        424         Root MSE        =     0.1583

                         (Std. err. adjusted for 423 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   -.108486    .217721    -0.50   0.619    -.5364387    .3194666
         llr |   .0608286   .0132276     4.60   0.000     .0348285    .0868287
    inc1Xllr |   1.329347   .4075987     3.26   0.001     .5281708    2.130524
     llareab |   .0063984   .0012627     5.07   0.000     .0039164    .0088804
      lldist |  -.0073675   .0013847    -5.32   0.000    -.0100893   -.0046457
      lneigh |   .0725018   .0109368     6.63   0.000     .0510043    .0939992
   lcoastala |   .0152562   .0037966     4.02   0.000     .0077936    .0227188
   lcoastalb |   .0032645   .0031748     1.03   0.304    -.0029759     .009505
      llagea |    .121458   .0149537     8.12   0.000     .0920651     .150851
      llageb |   .1199421   .0148017     8.10   0.000     .0908479    .1490363
llnumneighsa |  -.0036897   .0021561    -1.71   0.088    -.0079277    .0005483
llnumneighsb |  -.0054022   .0021935    -2.46   0.014    -.0097139   -.0010906
   llelevsda |  -.0022486   .0006677    -3.37   0.001     -.003561   -.0009362
   llelevsdb |   -.001182   .0004342    -2.72   0.007    -.0020355   -.0003286
 noeventyear |  -.0136085   .0017945    -7.58   0.000    -.0171358   -.0100813
   evspline1 |  -3.44e-06   4.81e-07    -7.16   0.000    -4.39e-06   -2.50e-06
   evspline2 |   1.57e-06   2.25e-07     6.99   0.000     1.13e-06    2.01e-06
   evspline3 |  -1.90e-07   2.97e-08    -6.38   0.000    -2.48e-07   -1.31e-07
       _cons |  -1.033573   .1288168    -8.02   0.000    -1.286775   -.7803701
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb(ye
> ar) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  3,294,702
Absorbing 1 HDFE group                            F(  25,    422) =   11059.27
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1564
Number of clusters (idd2)    =     74,200         Adj R-squared   =     0.1564
Number of clusters (ida)     =        423         Within R-sq.    =     0.1561
Number of clusters (idb)     =        424         Root MSE        =     0.1579

                         (Std. err. adjusted for 423 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .3776623   .1867491     2.02   0.044      .010588    .7447365
inc1Xgrow~ra |   .0917555   .0283195     3.24   0.001     .0360907    .1474202
peaceXgro~ra |  -.0000502    .000609    -0.08   0.934    -.0012473    .0011468
inc1Xgrow~ea |  -.0310802   .0296724    -1.05   0.295    -.0894043     .027244
peaceXgro~ea |    .002137   .0004159     5.14   0.000     .0013196    .0029544
inc1Xshri~rb |   .0787078   .0385601     2.04   0.042      .002914    .1545016
peaceXshr~rb |  -.0010323   .0006296    -1.64   0.102    -.0022699    .0002053
inc1Xshri~eb |   .0040724   .0386794     0.11   0.916    -.0719559    .0801006
peaceXshr~eb |   .0006423   .0004177     1.54   0.125    -.0001788    .0014634
     llareaa |   .0011674   .0007491     1.56   0.120    -.0003049    .0026398
     llareab |    .003239    .000856     3.78   0.000     .0015566    .0049215
      lldist |  -.0074714   .0014322    -5.22   0.000    -.0102865   -.0046562
      lneigh |   .0716809   .0108933     6.58   0.000      .050269    .0930929
   lcoastala |   .0083746   .0035036     2.39   0.017      .001488    .0152612
   lcoastalb |   .0033454   .0029587     1.13   0.259    -.0024703    .0091611
      llagea |   .1193853   .0148316     8.05   0.000     .0902322    .1485383
      llageb |    .118971   .0148481     8.01   0.000     .0897856    .1481565
llnumneighsa |   -.004948   .0022491    -2.20   0.028    -.0093688   -.0005271
llnumneighsb |   -.005819   .0021717    -2.68   0.008    -.0100878   -.0015502
   llelevsda |  -.0008722   .0004194    -2.08   0.038    -.0016966   -.0000477
   llelevsdb |  -.0012163   .0004574    -2.66   0.008    -.0021154   -.0003171
 noeventyear |  -.0135548   .0017967    -7.54   0.000    -.0170865   -.0100232
   evspline1 |  -3.44e-06   4.82e-07    -7.14   0.000    -4.38e-06   -2.49e-06
   evspline2 |   1.57e-06   2.25e-07     6.97   0.000     1.13e-06    2.01e-06
   evspline3 |  -1.90e-07   2.97e-08    -6.40   0.000    -2.49e-07   -1.32e-07
       _cons |  -.9589414   .1213516    -7.90   0.000     -1.19747   -.7204125
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m3

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb(ye
> ar idd) cluster(idd2 ida idb)
(dropped 14652 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,280,050
Absorbing 2 HDFE groups                           F(  25,    394) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.3939
Number of clusters (idd2)    =     66,846         Adj R-squared   =     0.3682
Number of clusters (ida)     =        395         Within R-sq.    =     0.0525
Number of clusters (idb)     =        396         Root MSE        =     0.1356

                         (Std. err. adjusted for 395 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .0050659   .1407224     0.04   0.971    -.2715948    .2817267
inc1Xgrow~ra |   .0707163   .0177322     3.99   0.000     .0358548    .1055779
peaceXgro~ra |    .000675   .0007665     0.88   0.379     -.000832     .002182
inc1Xgrow~ea |  -.0180966    .014039    -1.29   0.198    -.0456973    .0095041
peaceXgro~ea |   .0021727   .0005543     3.92   0.000     .0010828    .0032625
inc1Xshri~rb |   .0428165   .0163587     2.62   0.009     .0106551    .0749778
peaceXshr~rb |  -.0005647    .000724    -0.78   0.436    -.0019881    .0008587
inc1Xshri~eb |   .0079798   .0159314     0.50   0.617    -.0233414    .0393009
peaceXshr~eb |  -.0001752   .0004174    -0.42   0.675    -.0009959    .0006455
     llareaa |  -.0085069   .0032331    -2.63   0.009    -.0148632   -.0021506
     llareab |   .0025754   .0024086     1.07   0.286      -.00216    .0073107
      lldist |  -.0355001   .0060122    -5.90   0.000    -.0473201     -.02368
      lneigh |    .103401   .0320387     3.23   0.001     .0404128    .1663893
   lcoastala |   .0130231   .0066092     1.97   0.049     .0000295    .0260167
   lcoastalb |  -.0184678   .0068473    -2.70   0.007    -.0319295    -.005006
      llagea |    .147792   .0250981     5.89   0.000      .098449     .197135
      llageb |   .1487053   .0252744     5.88   0.000     .0990157    .1983949
llnumneighsa |  -.0048295   .0032436    -1.49   0.137    -.0112065    .0015475
llnumneighsb |   -.004446   .0051666    -0.86   0.390    -.0146036    .0057116
   llelevsda |  -.0026369   .0021954    -1.20   0.230    -.0069531    .0016794
   llelevsdb |  -.0041357    .001927    -2.15   0.032    -.0079241   -.0003472
 noeventyear |    -.00944   .0014529    -6.50   0.000    -.0122964   -.0065836
   evspline1 |  -2.27e-06   3.77e-07    -6.03   0.000    -3.01e-06   -1.53e-06
   evspline2 |   9.61e-07   1.61e-07     5.97   0.000     6.44e-07    1.28e-06
   evspline3 |  -9.00e-08   1.68e-08    -5.35   0.000    -1.23e-07   -5.70e-08
       _cons |  -1.256533   .2655259    -4.73   0.000    -1.778557   -.7345078
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133257      133257           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m4

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads_noPRussia.tex.ster", replace
file dyads_noPRussia.tex.ster saved

. 
. esttab m1 m2 m3 m4 using "dyads_noPRussia.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains and losses without Russia and Prussia \label{
> tab:noPRussia}") ///
> order (inc1 llr inc1Xllr $X  llareaa llareab) ///  $CONTROLS) ///
> keep (inc1 llr inc1Xllr $X  llareaa llareab) /// $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE")
(output written to dyads_noPRussia.tex)

. 
.           
.           
. // GENERATE TABLE A8      
. // ROBUSTNESS TEST WITHOUT EMPIRES
. 
. eststo clear

. global X "inc1Xgrowthwara peaceXgrowthwara inc1Xgrowthpeacea peaceXgrowthpeac
> ea inc1Xshrinkwarb peaceXshrinkwarb inc1Xshrinkpeaceb peaceXshrinkpeaceb"

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb  "

. global TIMEVARS "noeventyear evspline*"

. global EXCLUDE "if namea!="Muscovy" & nameb!="Muscovy" & namea!="Habsburgs" &
>  nameb!="Habsburgs" & namea!="Ottoman Emirate" & nameb!="Ottoman Emirate""

. 
. reghdfe lnga0 inc1 llr  llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb(year) cl
> uster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,229,799
Absorbing 1 HDFE group                            F(  17,    420) =       7.50
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1341
Number of clusters (idd2)    =     72,937         Adj R-squared   =     0.1341
Number of clusters (ida)     =        421         Within R-sq.    =     0.1338
Number of clusters (idb)     =        421         Root MSE        =     0.1402

                         (Std. err. adjusted for 421 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |    .952406   .2101088     4.53   0.000     .5394102    1.365402
         llr |   .0471039   .0095554     4.93   0.000     .0283216    .0658862
     llareab |   .0052023    .000962     5.41   0.000     .0033114    .0070932
      lldist |  -.0058481   .0009849    -5.94   0.000    -.0077839   -.0039122
      lneigh |   .0677907    .010136     6.69   0.000     .0478672    .0877142
   lcoastala |   .0124285   .0032168     3.86   0.000     .0061055    .0187515
   lcoastalb |   .0023592   .0026691     0.88   0.377    -.0028872    .0076057
      llagea |   .1050266   .0129281     8.12   0.000     .0796148    .1304383
      llageb |   .1038756   .0128435     8.09   0.000     .0786301    .1291211
llnumneighsa |  -.0030192   .0015692    -1.92   0.055    -.0061037    .0000652
llnumneighsb |  -.0044134    .001691    -2.61   0.009    -.0077373   -.0010894
   llelevsda |  -.0016173   .0004969    -3.25   0.001    -.0025941   -.0006405
   llelevsdb |  -.0009255   .0003729    -2.48   0.013    -.0016585   -.0001925
 noeventyear |  -.0116471   .0015439    -7.54   0.000    -.0146819   -.0086124
   evspline1 |  -2.93e-06   4.12e-07    -7.12   0.000    -3.74e-06   -2.12e-06
   evspline2 |   1.33e-06   1.92e-07     6.96   0.000     9.56e-07    1.71e-06
   evspline3 |  -1.60e-07   2.51e-08    -6.37   0.000    -2.09e-07   -1.11e-07
       _cons |  -.8948664   .1107736    -8.08   0.000    -1.112606   -.6771268
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe lnga0 inc1 llr inc1Xllr  llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb
> (year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =  3,229,799
Absorbing 1 HDFE group                            F(  18,    420) =       7.27
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1346
Number of clusters (idd2)    =     72,937         Adj R-squared   =     0.1346
Number of clusters (ida)     =        421         Within R-sq.    =     0.1343
Number of clusters (idb)     =        421         Root MSE        =     0.1402

                         (Std. err. adjusted for 421 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.1432188   .4699005    -0.30   0.761    -1.066868    .7804308
         llr |   .0468688   .0095073     4.93   0.000      .028181    .0655566
    inc1Xllr |   1.226879   .6619767     1.85   0.065    -.0743208     2.52808
     llareab |    .005211   .0009651     5.40   0.000     .0033139     .007108
      lldist |  -.0058514   .0009847    -5.94   0.000     -.007787   -.0039159
      lneigh |   .0677794   .0101318     6.69   0.000     .0478641    .0876947
   lcoastala |   .0123664    .003186     3.88   0.000      .006104    .0186288
   lcoastalb |   .0023672   .0026847     0.88   0.378    -.0029098    .0076443
      llagea |   .1049431   .0129158     8.13   0.000     .0795554    .1303308
      llageb |   .1037948   .0128338     8.09   0.000     .0785683    .1290214
llnumneighsa |  -.0030274    .001564    -1.94   0.054    -.0061016    .0000467
llnumneighsb |  -.0044159   .0016993    -2.60   0.010    -.0077561   -.0010758
   llelevsda |   -.001612   .0004957    -3.25   0.001    -.0025864   -.0006376
   llelevsdb |  -.0009379   .0003727    -2.52   0.012    -.0016704   -.0002054
 noeventyear |  -.0116416    .001543    -7.54   0.000    -.0146746   -.0086086
   evspline1 |  -2.93e-06   4.12e-07    -7.12   0.000    -3.74e-06   -2.12e-06
   evspline2 |   1.33e-06   1.92e-07     6.96   0.000     9.56e-07    1.71e-06
   evspline3 |  -1.60e-07   2.51e-08    -6.37   0.000    -2.09e-07   -1.11e-07
       _cons |   -.893893   .1106687    -8.08   0.000    -1.111426   -.6763596
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb(ye
> ar) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,229,799
Absorbing 1 HDFE group                            F(  25,    420) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.1406
Number of clusters (idd2)    =     72,937         Adj R-squared   =     0.1406
Number of clusters (ida)     =        421         Within R-sq.    =     0.1402
Number of clusters (idb)     =        421         Root MSE        =     0.1397

                         (Std. err. adjusted for 421 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .3925818   .1846204     2.13   0.034     .0296868    .7554768
inc1Xgrow~ra |   .1054168     .03052     3.45   0.001     .0454259    .1654078
peaceXgro~ra |  -.0000283   .0006609    -0.04   0.966    -.0013274    .0012707
inc1Xgrow~ea |  -.0641143   .0213725    -3.00   0.003    -.1061246    -.022104
peaceXgro~ea |   .0018792   .0003774     4.98   0.000     .0011374     .002621
inc1Xshri~rb |   .1041549   .0301036     3.46   0.001     .0449823    .1633275
peaceXshr~rb |  -.0006693   .0005995    -1.12   0.265    -.0018477    .0005092
inc1Xshri~eb |  -.0073767   .0320173    -0.23   0.818    -.0703108    .0555574
peaceXshr~eb |    .000667   .0003982     1.68   0.095    -.0001157    .0014497
     llareaa |   .0009141   .0005323     1.72   0.087    -.0001321    .0019603
     llareab |   .0025248   .0006737     3.75   0.000     .0012007     .003849
      lldist |  -.0059419   .0009985    -5.95   0.000    -.0079046   -.0039792
      lneigh |   .0668515   .0101499     6.59   0.000     .0469005    .0868024
   lcoastala |   .0068543    .002823     2.43   0.016     .0013053    .0124033
   lcoastalb |   .0020885   .0025223     0.83   0.408    -.0028694    .0070464
      llagea |   .1029677   .0127603     8.07   0.000     .0778856    .1280497
      llageb |   .1026345   .0128012     8.02   0.000     .0774722    .1277969
llnumneighsa |  -.0040383   .0017513    -2.31   0.022    -.0074808   -.0005959
llnumneighsb |  -.0046932   .0016895    -2.78   0.006     -.008014   -.0013723
   llelevsda |  -.0006389   .0003425    -1.87   0.063    -.0013121    .0000343
   llelevsdb |  -.0008774   .0003766    -2.33   0.020    -.0016177   -.0001372
 noeventyear |  -.0115721   .0015337    -7.55   0.000    -.0145867   -.0085575
   evspline1 |  -2.92e-06   4.09e-07    -7.14   0.000    -3.72e-06   -2.12e-06
   evspline2 |   1.33e-06   1.90e-07     6.98   0.000     9.54e-07    1.70e-06
   evspline3 |  -1.60e-07   2.49e-08    -6.42   0.000    -2.09e-07   -1.11e-07
       _cons |  -.8316201   .1053231    -7.90   0.000    -1.038646   -.6245941
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m3

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS $EXCLUDE, absorb(ye
> ar idd) cluster(idd2 ida idb)
(dropped 14519 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,215,280
Absorbing 2 HDFE groups                           F(  25,    392) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.3601
Number of clusters (idd2)    =     65,665         Adj R-squared   =     0.3328
Number of clusters (ida)     =        393         Within R-sq.    =     0.0485
Number of clusters (idb)     =        393         Root MSE        =     0.1221

                         (Std. err. adjusted for 393 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .0511229   .0996278     0.51   0.608    -.1447488    .2469946
inc1Xgrow~ra |   .0742383   .0227152     3.27   0.001     .0295794    .1188972
peaceXgro~ra |   .0008198   .0007178     1.14   0.254    -.0005915    .0022311
inc1Xgrow~ea |  -.0319032   .0196409    -1.62   0.105    -.0705179    .0067115
peaceXgro~ea |   .0019666   .0005316     3.70   0.000     .0009216    .0030117
inc1Xshri~rb |   .0504877   .0149387     3.38   0.001     .0211177    .0798578
peaceXshr~rb |  -.0001006   .0005347    -0.19   0.851    -.0011517    .0009506
inc1Xshri~eb |    .007451   .0153004     0.49   0.627    -.0226301    .0375322
peaceXshr~eb |   .0001502   .0003853     0.39   0.697    -.0006073    .0009078
     llareaa |  -.0094686   .0029297    -3.23   0.001    -.0152284   -.0037088
     llareab |   .0015726   .0020845     0.75   0.451    -.0025257    .0056709
      lldist |  -.0299445   .0047231    -6.34   0.000    -.0392304   -.0206586
      lneigh |   .0992726   .0299306     3.32   0.001      .040428    .1581173
   lcoastala |   .0093054   .0057265     1.62   0.105     -.001953    .0205639
   lcoastalb |  -.0166263   .0061971    -2.68   0.008    -.0288099   -.0044426
      llagea |   .1316436   .0235653     5.59   0.000     .0853134    .1779738
      llageb |   .1322522   .0237338     5.57   0.000     .0855907    .1789137
llnumneighsa |  -.0012775   .0024561    -0.52   0.603    -.0061062    .0035513
llnumneighsb |  -.0013857     .00471    -0.29   0.769    -.0106457    .0078743
   llelevsda |  -.0018142   .0019603    -0.93   0.355    -.0056681    .0020398
   llelevsdb |  -.0033304   .0017224    -1.93   0.054    -.0067166    .0000558
 noeventyear |  -.0083852   .0013562    -6.18   0.000    -.0110516   -.0057188
   evspline1 |  -2.00e-06   3.50e-07    -5.72   0.000    -2.69e-06   -1.32e-06
   evspline2 |   8.46e-07   1.49e-07     5.68   0.000     5.53e-07    1.14e-06
   evspline3 |  -7.82e-08   1.51e-08    -5.19   0.000    -1.08e-07   -4.86e-08
       _cons |  -1.123429   .2481672    -4.53   0.000    -1.611334   -.6355241
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    131295      131295           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m4

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads_noEmpire.tex.ster", replace
file dyads_noEmpire.tex.ster saved

. 
. esttab m1 m2 m3 m4 using "dyads_noEmpire.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains and losses without empires \label{tab:noEmpir
> e}") ///
> order (inc1 llr inc1Xllr $X  llareaa llareab $CONTROLS) ///
> keep (inc1 llr inc1Xllr $X  llareaa llareab $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE")
(output written to dyads_noEmpire.tex)

.           
.           
. 
. 
.                   
. // ROBUSTNESS TEST OVER THREE CENTURIES (NOT SHOWN IN PAPER OR APPENDIX)
. 
. eststo clear

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS if year<1590, absor
> b(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  1,157,376
Absorbing 1 HDFE group                            F(  25,    318) =  371426.26
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2067
Number of clusters (idd2)    =     48,226         Adj R-squared   =     0.2066
Number of clusters (ida)     =        319         Within R-sq.    =     0.2065
Number of clusters (idb)     =        319         Root MSE        =     0.1447

                         (Std. err. adjusted for 319 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |   .5619387    .231192     2.43   0.016     .1070797    1.016798
inc1Xgrow~ra |   .0765319   .0296793     2.58   0.010     .0181393    .1349244
peaceXgro~ra |   .0012015   .0006085     1.97   0.049     4.26e-06    .0023988
inc1Xgrow~ea |  -.0005182   .0369389    -0.01   0.989    -.0731937    .0721574
peaceXgro~ea |   .0006709   .0003857     1.74   0.083     -.000088    .0014297
inc1Xshri~rb |   .0613021   .0434587     1.41   0.159    -.0242008     .146805
peaceXshr~rb |  -.0000365   .0005381    -0.07   0.946    -.0010953    .0010223
inc1Xshri~eb |  -.0413475     .03944    -1.05   0.295    -.1189439    .0362489
peaceXshr~eb |   .0002674   .0003438     0.78   0.437     -.000409    .0009438
     llareaa |   .0019197   .0009052     2.12   0.035     .0001387    .0037007
     llareab |   .0031812   .0009742     3.27   0.001     .0012646    .0050979
      lldist |  -.0060599   .0014144    -4.28   0.000    -.0088427   -.0032772
      lneigh |   .0450032   .0103343     4.35   0.000     .0246709    .0653354
   lcoastala |   .0059654   .0028137     2.12   0.035     .0004296    .0115011
   lcoastalb |   .0017412   .0026079     0.67   0.505    -.0033897    .0068721
      llagea |   .4338988    .049186     8.82   0.000     .3371277      .53067
      llageb |   .4359681   .0494175     8.82   0.000     .3387415    .5331947
llnumneighsa |  -.0049934   .0023923    -2.09   0.038    -.0097002   -.0002866
llnumneighsb |  -.0059335   .0024187    -2.45   0.015    -.0106922   -.0011748
   llelevsda |  -.0007408   .0004648    -1.59   0.112    -.0016554    .0001738
   llelevsdb |  -.0011566   .0005113    -2.26   0.024    -.0021625   -.0001507
 noeventyear |  -.0323128   .0036292    -8.90   0.000    -.0394531   -.0251724
   evspline1 |  -.0000102   1.23e-06    -8.26   0.000    -.0000126   -7.77e-06
   evspline2 |   .0000481   6.54e-06     7.35   0.000     .0000352     .000061
   evspline3 |  -.0000624   8.67e-06    -7.20   0.000    -.0000794   -.0000453
       _cons |  -3.648182   .4156468    -8.78   0.000    -4.465947   -2.830417
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        19           0          19     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

.   
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS if year>=1590 & yea
> r<1690, absorb(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  1,093,563
Absorbing 1 HDFE group                            F(  25,    326) =    3780.17
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1915
Number of clusters (idd2)    =     49,251         Adj R-squared   =     0.1914
Number of clusters (ida)     =        327         Within R-sq.    =     0.1913
Number of clusters (idb)     =        327         Root MSE        =     0.1765

                         (Std. err. adjusted for 327 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.0754847   .5671316    -0.13   0.894    -1.191184    1.040215
inc1Xgrow~ra |   .1039823   .0530548     1.96   0.051    -.0003906    .2083553
peaceXgro~ra |   .0006866   .0008573     0.80   0.424    -.0009999    .0023731
inc1Xgrow~ea |   .0029216   .0808515     0.04   0.971    -.1561349    .1619782
peaceXgro~ea |   .0021555   .0006582     3.27   0.001     .0008606    .0034504
inc1Xshri~rb |   .0879728   .0545725     1.61   0.108    -.0193859    .1953315
peaceXshr~rb |  -.0020991   .0009453    -2.22   0.027    -.0039588   -.0002395
inc1Xshri~eb |   .0055811   .0665876     0.08   0.933    -.1254145    .1365767
peaceXshr~eb |    .000368   .0006053     0.61   0.544    -.0008228    .0015588
     llareaa |   .0014382   .0012646     1.14   0.256    -.0010497    .0039261
     llareab |   .0048572   .0015079     3.22   0.001     .0018908    .0078237
      lldist |  -.0090711   .0020997    -4.32   0.000    -.0132017   -.0049404
      lneigh |   .0997201   .0153801     6.48   0.000     .0694634    .1299768
   lcoastala |   .0093565   .0051374     1.82   0.069    -.0007501    .0194631
   lcoastalb |   .0049373   .0052848     0.93   0.351    -.0054593    .0153339
      llagea |   .1468728   .0206341     7.12   0.000     .1062799    .1874657
      llageb |   .1466384   .0207321     7.07   0.000     .1058528     .187424
llnumneighsa |  -.0059273   .0035242    -1.68   0.094    -.0128605    .0010058
llnumneighsb |  -.0067703   .0034691    -1.95   0.052     -.013595    .0000544
   llelevsda |  -.0008575   .0006401    -1.34   0.181    -.0021168    .0004017
   llelevsdb |   -.001702   .0007314    -2.33   0.021    -.0031408   -.0002632
 noeventyear |  -.0153608   .0020906    -7.35   0.000    -.0194735    -.011248
   evspline1 |  -3.91e-06   5.46e-07    -7.17   0.000    -4.99e-06   -2.84e-06
   evspline2 |   1.89e-06   2.70e-07     7.00   0.000     1.36e-06    2.42e-06
   evspline3 |  -3.27e-07   5.33e-08    -6.13   0.000    -4.32e-07   -2.22e-07
       _cons |  -1.258529   .1832128    -6.87   0.000    -1.618958   -.8981004
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        20           0          20     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe lnga0 inc1 $X llareaa llareab $CONTROLS $TIMEVARS if year>=1690, abso
> rb(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  1,057,730
Absorbing 1 HDFE group                            F(  25,    286) =     101.69
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1614
Number of clusters (idd2)    =     39,509         Adj R-squared   =     0.1614
Number of clusters (ida)     =        287         Within R-sq.    =     0.1610
Number of clusters (idb)     =        287         Root MSE        =     0.1561

                         (Std. err. adjusted for 287 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
        inc1 |  -.9388458   .7070598    -1.33   0.185    -2.330547    .4528552
inc1Xgrow~ra |   .1399141    .043825     3.19   0.002     .0536535    .2261746
peaceXgro~ra |  -.0003022   .0006125    -0.49   0.622    -.0015078    .0009033
inc1Xgrow~ea |   .0065325   .0537916     0.12   0.903    -.0993452    .1124102
peaceXgro~ea |   .0019441   .0005007     3.88   0.000     .0009586    .0029297
inc1Xshri~rb |   .0978351   .0435256     2.25   0.025      .012164    .1835062
peaceXshr~rb |  -.0017655   .0007318    -2.41   0.016    -.0032059   -.0003252
inc1Xshri~eb |   .0841155    .051624     1.63   0.104    -.0174956    .1857267
peaceXshr~eb |   .0002717   .0004725     0.57   0.566    -.0006584    .0012017
     llareaa |   .0002345   .0010497     0.22   0.823    -.0018316    .0023005
     llareab |   .0032324   .0010166     3.18   0.002     .0012314    .0052334
      lldist |  -.0071819   .0014908    -4.82   0.000    -.0101162   -.0042476
      lneigh |   .0478662   .0089057     5.37   0.000     .0303371    .0653953
   lcoastala |   .0099061   .0044322     2.24   0.026     .0011822      .01863
   lcoastalb |   .0059969   .0034632     1.73   0.084    -.0008196    .0128135
      llagea |   .0737466   .0093723     7.87   0.000     .0552992    .0921941
      llageb |   .0725447   .0091805     7.90   0.000     .0544747    .0906147
llnumneighsa |  -.0032839   .0023138    -1.42   0.157    -.0078382    .0012703
llnumneighsb |   -.005071    .002161    -2.35   0.020    -.0093245   -.0008176
   llelevsda |  -.0006549   .0005548    -1.18   0.239    -.0017469    .0004371
   llelevsdb |  -.0013007   .0005762    -2.26   0.025    -.0024348   -.0001666
 noeventyear |  -.0126249    .001802    -7.01   0.000    -.0161718    -.009078
   evspline1 |  -3.44e-06   5.20e-07    -6.61   0.000    -4.46e-06   -2.42e-06
   evspline2 |   1.58e-06   2.45e-07     6.48   0.000     1.10e-06    2.07e-06
   evspline3 |  -1.90e-07   3.16e-08    -6.03   0.000    -2.52e-07   -1.28e-07
       _cons |   -.516361   .0710004    -7.27   0.000    -.6561106   -.3766114
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        21           0          21     |
-----------------------------------------------------+

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m3

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads_centuries.ster", replace
file dyads_centuries.ster saved

. 
. esttab m1 m2 m3  using "dyads_centuries.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic analysis of gains and losses for centuries from 1490, 1590 and 
> 1690 \label{tab:dyad_3cent}") ///
> order (inc1 $X  llareaa llareab $CONTROLS) ///
> keep (inc1 $X  llareaa llareab $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("geocontrols Geo. Controls" "yearfe Year FE" "dyadfe Dyad FE")
(output written to dyads_centuries.tex)

.           
.           
. 
. // GEMERATE TABLE A9
. // MODELING DYADIC ONSET
. 
. 
. eststo clear

. 
. global CUMULVARS "llgrowthwara llgrowthpeacea llshrinkwarb llshrinkpeaceb"

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb"

. global TIMEVARS "pyis pyispline*"

. 
. gen onsetinita100 = onsetinita1*100

. // lr lrXlr
. 
. logit onsetinita1  llr inc1Xllr llareab $CONTROLS $TIMEVARS i.year,  cluster(
> idd2)

note: 1690.year != 0 predicts failure perfectly;
      1690.year omitted and 57834 obs not used.

note: 1745.year != 0 predicts failure perfectly;
      1745.year omitted and 49006 obs not used.

note: 1750.year != 0 predicts failure perfectly;
      1750.year omitted and 46008 obs not used.

note: 1770.year != 0 predicts failure perfectly;
      1770.year omitted and 48620 obs not used.

note: 1790.year != 0 predicts failure perfectly;
      1790.year omitted and 46008 obs not used.

Iteration 0:   log pseudolikelihood = -4245.5135  
Iteration 1:   log pseudolikelihood = -2668.7105  (backed up)
Iteration 2:   log pseudolikelihood =  -1874.382  
Iteration 3:   log pseudolikelihood = -1732.8022  
Iteration 4:   log pseudolikelihood = -1722.2865  
Iteration 5:   log pseudolikelihood = -1721.6952  
Iteration 6:   log pseudolikelihood = -1721.6889  
Iteration 7:   log pseudolikelihood = -1721.6889  

Logistic regression                                  Number of obs = 3,069,860
                                                     Wald chi2(71) =   8369.25
                                                     Prob > chi2   =    0.0000
Log pseudolikelihood = -1721.6889                    Pseudo R2     =    0.5945

                              (Std. err. adjusted for 74,188 clusters in idd2)
------------------------------------------------------------------------------
             |               Robust
 onsetinita1 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         llr |   6.650777   1.142588     5.82   0.000     4.411345     8.89021
    inc1Xllr |   4.902596   .2816203    17.41   0.000     4.350631    5.454562
     llareab |    .512921   .0624979     8.21   0.000     .3904274    .6354145
      lldist |  -.6161154   .0824509    -7.47   0.000    -.7777162   -.4545145
      lneigh |  -2.253355   .4652793    -4.84   0.000    -3.165286   -1.341425
   lcoastala |    .554911   .2613428     2.12   0.034     .0426885    1.067134
   lcoastalb |   .0911143   .2560248     0.36   0.722    -.4106851    .5929137
      llagea |   1.973702   .6500823     3.04   0.002     .6995644     3.24784
      llageb |  -.1366184    .230886    -0.59   0.554    -.5891467    .3159099
llnumneighsa |   .1227812   .0730237     1.68   0.093    -.0203426     .265905
llnumneighsb |   .1945241   .0710224     2.74   0.006     .0553228    .3337255
   llelevsda |   .1312516   .0677505     1.94   0.053     -.001537    .2640401
   llelevsdb |  -.0072395   .0682706    -0.11   0.916    -.1410475    .1265684
        pyis |  -.0084278   .0119639    -0.70   0.481    -.0318766    .0150211
  pyispline1 |  -3.81e-06   6.12e-06    -0.62   0.533    -.0000158    8.19e-06
  pyispline2 |   2.18e-06   4.28e-06     0.51   0.611    -6.21e-06    .0000106
  pyispline3 |  -3.13e-07   1.15e-06    -0.27   0.785    -2.56e-06    1.94e-06
             |
        year |
       1500  |  -1.574092   .6280746    -2.51   0.012    -2.805095   -.3430884
       1505  |  -2.730602   .9340369    -2.92   0.003    -4.561281   -.8999236
       1510  |  -3.415473   1.045858    -3.27   0.001    -5.465318   -1.365628
       1515  |  -1.229148    1.17829    -1.04   0.297    -3.538554    1.080259
       1520  |  -.9815788   1.287338    -0.76   0.446    -3.504715    1.541557
       1525  |  -3.784199   1.321181    -2.86   0.004    -6.373667   -1.194731
       1530  |  -3.103394   1.452417    -2.14   0.033     -5.95008   -.2567087
       1535  |  -4.081629   1.476059    -2.77   0.006    -6.974652   -1.188606
       1540  |  -3.748379    1.64123    -2.28   0.022    -6.965131   -.5316262
       1545  |  -4.730443   1.651857    -2.86   0.004    -7.968022   -1.492863
       1550  |  -4.623745   1.689238    -2.74   0.006     -7.93459     -1.3129
       1555  |  -5.154537   1.719381    -3.00   0.003    -8.524462   -1.784611
       1560  |  -5.269709   1.807917    -2.91   0.004    -8.813162   -1.726256
       1565  |  -5.892332   1.815614    -3.25   0.001     -9.45087   -2.333795
       1570  |  -5.762303   1.845505    -3.12   0.002    -9.379426   -2.145179
       1575  |  -5.020813   1.932121    -2.60   0.009      -8.8077   -1.233925
       1580  |  -6.113462   1.997391    -3.06   0.002    -10.02828   -2.198648
       1585  |  -5.761359   1.968023    -2.93   0.003    -9.618614   -1.904105
       1590  |  -6.379979   1.921658    -3.32   0.001    -10.14636   -2.613599
       1595  |  -7.760756   2.289015    -3.39   0.001    -12.24714   -3.274369
       1600  |  -6.447094   2.066734    -3.12   0.002    -10.49782    -2.39637
       1605  |  -6.123499    2.06967    -2.96   0.003    -10.17998    -2.06702
       1610  |  -5.946602   2.073839    -2.87   0.004    -10.01125   -1.881952
       1615  |  -5.691445   2.164783    -2.63   0.009    -9.934342   -1.448548
       1620  |  -5.806651    2.16286    -2.68   0.007    -10.04578   -1.567523
       1625  |  -6.141261   2.164124    -2.84   0.005    -10.38287   -1.899655
       1630  |  -6.717665   2.270317    -2.96   0.003    -11.16741   -2.267925
       1635  |  -6.262416    2.24306    -2.79   0.005    -10.65873     -1.8661
       1640  |  -7.182264   2.308446    -3.11   0.002    -11.70674   -2.657793
       1645  |  -7.004755   2.263349    -3.09   0.002    -11.44084   -2.568672
       1650  |  -7.991159   2.348398    -3.40   0.001    -12.59393   -3.388384
       1655  |  -6.127498   2.416762    -2.54   0.011    -10.86426   -1.390731
       1660  |  -8.011853   2.623641    -3.05   0.002     -13.1541   -2.869611
       1665  |  -6.597413   2.364509    -2.79   0.005    -11.23177    -1.96306
       1670  |  -6.513529   2.390721    -2.72   0.006    -11.19926   -1.827803
       1675  |  -7.056733   2.394863    -2.95   0.003    -11.75058   -2.362888
       1680  |  -7.707643   2.449021    -3.15   0.002    -12.50763   -2.907651
       1685  |  -6.872702   2.411423    -2.85   0.004      -11.599   -2.146399
       1690  |          0  (empty)
       1695  |  -8.633611   2.614402    -3.30   0.001    -13.75774   -3.509478
       1700  |  -7.224244   2.561325    -2.82   0.005    -12.24435   -2.204139
       1705  |  -9.964342   2.786892    -3.58   0.000    -15.42655   -4.502134
       1710  |  -8.753414   2.640585    -3.31   0.001    -13.92887   -3.577962
       1715  |  -8.778419   2.605533    -3.37   0.001    -13.88517   -3.671667
       1720  |  -9.980463   2.779145    -3.59   0.000    -15.42749   -4.533438
       1725  |  -8.041315   2.636597    -3.05   0.002    -13.20895   -2.873679
       1730  |  -7.733326   2.558858    -3.02   0.003     -12.7486   -2.718056
       1735  |  -9.152028   2.678165    -3.42   0.001    -14.40113   -3.902922
       1740  |  -7.709657   2.637979    -2.92   0.003       -12.88   -2.539313
       1745  |          0  (empty)
       1750  |          0  (empty)
       1755  |  -7.614995     2.6472    -2.88   0.004    -12.80341   -2.426579
       1760  |  -9.197489   2.839214    -3.24   0.001    -14.76225   -3.632732
       1765  |  -9.620071   2.864519    -3.36   0.001    -15.23442   -4.005718
       1770  |          0  (empty)
       1775  |  -8.055977   2.690652    -2.99   0.003    -13.32956   -2.782395
       1780  |  -9.584514   2.909758    -3.29   0.001    -15.28754   -3.881493
       1785  |  -7.992821   2.779208    -2.88   0.004    -13.43997   -2.545675
       1790  |          0  (empty)
             |
       _cons |   -23.6076   2.572475    -9.18   0.000    -28.64956   -18.56565
------------------------------------------------------------------------------
Note: 29411 failures and 0 successes completely determined.

. estadd local estim "Logit"

added macro:
              e(estim) : "Logit"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

. 
. logit onsetinita1  $CUMULVARS llareaa llareab $CONTROLS $TIMEVARS i.year,  cl
> uster(idd2)

note: 1690.year != 0 predicts failure perfectly;
      1690.year omitted and 57834 obs not used.

note: 1745.year != 0 predicts failure perfectly;
      1745.year omitted and 49006 obs not used.

note: 1750.year != 0 predicts failure perfectly;
      1750.year omitted and 46008 obs not used.

note: 1770.year != 0 predicts failure perfectly;
      1770.year omitted and 48620 obs not used.

note: 1790.year != 0 predicts failure perfectly;
      1790.year omitted and 46008 obs not used.

Iteration 0:   log pseudolikelihood = -4245.5135  
Iteration 1:   log pseudolikelihood = -3126.1591  
Iteration 2:   log pseudolikelihood = -2570.6068  
Iteration 3:   log pseudolikelihood = -2241.2854  
Iteration 4:   log pseudolikelihood = -2203.6361  
Iteration 5:   log pseudolikelihood = -2202.3666  
Iteration 6:   log pseudolikelihood = -2202.3443  
Iteration 7:   log pseudolikelihood = -2202.3443  

Logistic regression                                  Number of obs = 3,069,860
                                                     Wald chi2(74) =   6954.21
                                                     Prob > chi2   =    0.0000
Log pseudolikelihood = -2202.3443                    Pseudo R2     =    0.4813

                              (Std. err. adjusted for 74,188 clusters in idd2)
------------------------------------------------------------------------------
             |               Robust
 onsetinita1 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
llgrowthwara |   .0656151    .016743     3.92   0.000     .0327994    .0984307
llgrowthpe~a |  -.0860407    .025536    -3.37   0.001    -.1360903   -.0359911
llshrinkwarb |   .0173551   .0196154     0.88   0.376    -.0210904    .0558007
llshrinkpe~b |   -.025101   .0220043    -1.14   0.254    -.0682287    .0180266
     llareaa |   .4479589   .0456557     9.81   0.000     .3584754    .5374424
     llareab |   .3784617   .0390518     9.69   0.000     .3019216    .4550018
      lldist |  -.8238601   .0682337   -12.07   0.000    -.9575958   -.6901245
      lneigh |  -2.830027   .3787018    -7.47   0.000    -3.572269   -2.087785
   lcoastala |   .6726469    .247863     2.71   0.007     .1868443    1.158449
   lcoastalb |   .5262463   .2697266     1.95   0.051     -.002408    1.054901
      llagea |   1.906799    .408138     4.67   0.000     1.106863    2.706735
      llageb |   .5080604    .236059     2.15   0.031     .0453932    .9707276
llnumneighsa |   .1437417   .0736146     1.95   0.051    -.0005402    .2880237
llnumneighsb |   .1929803   .0709333     2.72   0.007     .0539535     .332007
   llelevsda |   .1886388   .0546216     3.45   0.001     .0815824    .2956952
   llelevsdb |   .0974124   .0645824     1.51   0.131    -.0291668    .2239916
        pyis |   -.067016   .0149134    -4.49   0.000    -.0962456   -.0377864
  pyispline1 |   -.000017   6.43e-06    -2.65   0.008    -.0000296   -4.42e-06
  pyispline2 |   8.74e-06   4.21e-06     2.08   0.038     4.92e-07     .000017
  pyispline3 |  -8.69e-07   1.02e-06    -0.85   0.395    -2.87e-06    1.13e-06
             |
        year |
       1500  |  -1.315821   .4847627    -2.71   0.007    -2.265938   -.3657031
       1505  |  -2.964721   .7509375    -3.95   0.000    -4.436532   -1.492911
       1510  |  -3.239196   .8375672    -3.87   0.000    -4.880798   -1.597594
       1515  |   -1.53553   .8801309    -1.74   0.081    -3.260555    .1894949
       1520  |  -1.268814   .9551602    -1.33   0.184    -3.140894    .6032657
       1525  |  -3.484862   .9422048    -3.70   0.000     -5.33155   -1.638175
       1530  |  -2.937079   1.068843    -2.75   0.006    -5.031972   -.8421863
       1535  |  -4.080914   1.086401    -3.76   0.000    -6.210221   -1.951607
       1540  |  -3.611983    1.17413    -3.08   0.002    -5.913236    -1.31073
       1545  |  -4.878348   1.219242    -4.00   0.000    -7.268019   -2.488677
       1550  |   -4.36603   1.239266    -3.52   0.000    -6.794947   -1.937113
       1555  |  -4.700053   1.270097    -3.70   0.000    -7.189397   -2.210709
       1560  |  -5.055961   1.311321    -3.86   0.000    -7.626102    -2.48582
       1565  |  -5.499202   1.377954    -3.99   0.000    -8.199941   -2.798463
       1570  |  -5.527425   1.341063    -4.12   0.000     -8.15586    -2.89899
       1575  |  -5.002764   1.320656    -3.79   0.000    -7.591203   -2.414325
       1580  |  -6.089677   1.461105    -4.17   0.000    -8.953391   -3.225963
       1585  |  -5.673353   1.392473    -4.07   0.000    -8.402549   -2.944157
       1590  |   -6.18341   1.404599    -4.40   0.000    -8.936374   -3.430447
       1595  |  -7.771473   1.615507    -4.81   0.000    -10.93781   -4.605138
       1600  |  -6.352518   1.487047    -4.27   0.000    -9.267076    -3.43796
       1605  |  -6.089023   1.467561    -4.15   0.000    -8.965389   -3.212657
       1610  |   -5.96275   1.513328    -3.94   0.000    -8.928819   -2.996681
       1615  |  -5.730261   1.522069    -3.76   0.000    -8.713461    -2.74706
       1620  |  -5.474905   1.484282    -3.69   0.000    -8.384043   -2.565766
       1625  |  -5.761653   1.546718    -3.73   0.000    -8.793164   -2.730141
       1630  |  -6.458957   1.607104    -4.02   0.000    -9.608823   -3.309092
       1635  |  -6.343954   1.541121    -4.12   0.000    -9.364496   -3.323412
       1640  |  -7.359931   1.600119    -4.60   0.000    -10.49611   -4.223755
       1645  |  -7.104128    1.56611    -4.54   0.000    -10.17365   -4.034609
       1650  |  -8.192124   1.624692    -5.04   0.000    -11.37646   -5.007786
       1655  |  -6.179727   1.714121    -3.61   0.000    -9.539343   -2.820112
       1660  |  -7.938336   1.969042    -4.03   0.000    -11.79759   -4.079084
       1665  |   -6.53692   1.640258    -3.99   0.000    -9.751766   -3.322073
       1670  |  -6.317086   1.673207    -3.78   0.000    -9.596512   -3.037661
       1675  |  -7.041885   1.709382    -4.12   0.000    -10.39221   -3.691558
       1680  |   -7.56394    1.73347    -4.36   0.000    -10.96148   -4.166401
       1685  |  -7.125971   1.631962    -4.37   0.000    -10.32456   -3.927384
       1690  |          0  (empty)
       1695  |  -8.493396   1.908985    -4.45   0.000    -12.23494   -4.751854
       1700  |  -6.791955   1.799048    -3.78   0.000    -10.31802   -3.265885
       1705  |  -9.849117   2.105533    -4.68   0.000    -13.97589   -5.722348
       1710  |  -8.544218   1.910561    -4.47   0.000    -12.28885   -4.799587
       1715  |   -8.42466   1.896182    -4.44   0.000    -12.14111   -4.708211
       1720  |  -10.13037   2.047059    -4.95   0.000    -14.14253   -6.118206
       1725  |  -8.196816   1.792049    -4.57   0.000    -11.70917   -4.684465
       1730  |  -8.002925   1.786802    -4.48   0.000    -11.50499   -4.500858
       1735  |  -9.323079   2.021474    -4.61   0.000    -13.28509   -5.361063
       1740  |  -7.875623   1.822166    -4.32   0.000      -11.447   -4.304244
       1745  |          0  (empty)
       1750  |          0  (empty)
       1755  |  -7.804517   1.883489    -4.14   0.000    -11.49609   -4.112947
       1760  |  -9.368967   1.984509    -4.72   0.000    -13.25853   -5.479401
       1765  |   -9.45789   2.192832    -4.31   0.000    -13.75576   -5.160018
       1770  |          0  (empty)
       1775  |  -8.346793   1.861197    -4.48   0.000    -11.99467   -4.698914
       1780  |  -10.30832    2.15165    -4.79   0.000    -14.52548   -6.091167
       1785  |  -8.380928   2.029427    -4.13   0.000    -12.35853   -4.403323
       1790  |          0  (empty)
             |
       _cons |  -21.42488   1.682654   -12.73   0.000    -24.72282   -18.12693
------------------------------------------------------------------------------
Note: 32453 failures and 0 successes completely determined.

. estadd local estim "Logit"

added macro:
              e(estim) : "Logit"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe onsetinita100 llr $CUMULVARS llareaa llareab $CONTROLS  $TIMEVARS, ab
> sorb(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  3,317,336
Absorbing 1 HDFE group                            F(  21,    423) =       8.81
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.0064
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.0063
Number of clusters (ida)     =        424         Within R-sq.    =     0.0063
Number of clusters (idb)     =        424         Root MSE        =     1.1348

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
onsetini~100 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         llr |   .3926956   .1315098     2.99   0.003     .1342016    .6511896
llgrowthwara |   .0184435   .0053595     3.44   0.001     .0079089    .0289781
llgrowthpe~a |    .002573    .001378     1.87   0.063    -.0001356    .0052815
llshrinkwarb |   .0076994   .0030869     2.49   0.013     .0016318     .013767
llshrinkpe~b |  -.0014253   .0014651    -0.97   0.331    -.0043051    .0014545
     llareaa |  -.0150265   .0056599    -2.65   0.008    -.0261516   -.0039015
     llareab |   .0311951   .0097485     3.20   0.001     .0120335    .0503566
      lldist |  -.0268751   .0095529    -2.81   0.005    -.0456522   -.0080979
      lneigh |   .0440328    .021061     2.09   0.037     .0026357      .08543
   lcoastala |     .03483   .0158367     2.20   0.028     .0037015    .0659585
   lcoastalb |   .0297116   .0142498     2.09   0.038     .0017023    .0577209
      llagea |   .2219629   .0862538     2.57   0.010     .0524235    .3915023
      llageb |   .2233267   .0864847     2.58   0.010     .0533334    .3933201
llnumneighsa |  -.0150323   .0074043    -2.03   0.043    -.0295862   -.0004784
llnumneighsb |  -.0093839   .0066312    -1.42   0.158    -.0224181    .0036503
   llelevsda |  -.0100551   .0034277    -2.93   0.004    -.0167926   -.0033176
   llelevsdb |  -.0050701   .0016175    -3.13   0.002    -.0082495   -.0018907
        pyis |   -.017654   .0066387    -2.66   0.008     -.030703   -.0046051
  pyispline1 |  -3.72e-06   1.38e-06    -2.68   0.008    -6.44e-06   -9.96e-07
  pyispline2 |   1.84e-06   6.86e-07     2.69   0.008     4.94e-07    3.19e-06
  pyispline3 |  -1.64e-07   6.33e-08    -2.59   0.010    -2.89e-07   -3.98e-08
       _cons |  -2.204484   .8404784    -2.62   0.009    -3.856518   -.5524495
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local estim "OLS"

added macro:
              e(estim) : "OLS"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m3

. 
. reghdfe onsetinita100 llr $CUMULVARS llareaa llareab $CONTROLS  $TIMEVARS, ab
> sorb(year idd) cluster(idd2 ida idb)
(dropped 14704 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,302,632
Absorbing 2 HDFE groups                           F(  21,    395) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.1157
Number of clusters (idd2)    =     66,850         Adj R-squared   =     0.0783
Number of clusters (ida)     =        396         Within R-sq.    =     0.0063
Number of clusters (idb)     =        396         Root MSE        =     1.0954

                         (Std. err. adjusted for 396 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
onsetini~100 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         llr |   .6113723   .2572696     2.38   0.018     .1055835    1.117161
llgrowthwara |   .0099322   .0046429     2.14   0.033     .0008043    .0190602
llgrowthpe~a |  -.0014937   .0022064    -0.68   0.499    -.0058314     .002844
llshrinkwarb |  -.0022049   .0030878    -0.71   0.476    -.0082755    .0038657
llshrinkpe~b |   .0002896   .0015729     0.18   0.854    -.0028028     .003382
     llareaa |  -.0185767   .0109175    -1.70   0.090    -.0400405     .002887
     llareab |   .0444937   .0203307     2.19   0.029     .0045239    .0844635
      lldist |   -.066722   .0209786    -3.18   0.002    -.1079656   -.0254784
      lneigh |  -.1487861   .0492008    -3.02   0.003    -.2455142    -.052058
   lcoastala |   .0335101   .0167638     2.00   0.046     .0005527    .0664674
   lcoastalb |   .0184466   .0126619     1.46   0.146    -.0064465    .0433397
      llagea |   .1387946    .046061     3.01   0.003     .0482393      .22935
      llageb |   .1392941   .0462987     3.01   0.003     .0482714    .2303167
llnumneighsa |  -.0087754   .0102526    -0.86   0.393    -.0289319    .0113811
llnumneighsb |   -.011588   .0088117    -1.32   0.189    -.0289117    .0057356
   llelevsda |  -.0109045   .0061877    -1.76   0.079    -.0230694    .0012604
   llelevsdb |  -.0035466    .003857    -0.92   0.358    -.0111294    .0040361
        pyis |   .0153745   .0041789     3.68   0.000     .0071588    .0235902
  pyispline1 |  -1.51e-06   5.32e-07    -2.83   0.005    -2.55e-06   -4.60e-07
  pyispline2 |   7.06e-07   2.59e-07     2.72   0.007     1.97e-07    1.22e-06
  pyispline3 |  -5.12e-08   2.75e-08    -1.86   0.064    -1.05e-07    2.90e-09
       _cons |  -4.059382    .815746    -4.98   0.000    -5.663129   -2.455635
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133700      133700           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local estim "OLS"

added macro:
              e(estim) : "OLS"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m4

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads_onset.ster", replace
file dyads_onset.ster saved

. 
. esttab m1 m2 m3 m4 using "dyads_onset.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic onset \label{tab:dyadonset}") ///
> order (llr $CUMULVARS  llareaa llareab) ///
> keep (llr $CUMULVARS  llareaa llareab) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("estim Esimation" "geocontrols Geo. Controls" "yearfe Year FE" 
> "dyadfe Dyad FE")
(output written to dyads_onset.tex)

.  
.  
. 
. 
. // GENERATE TABLE A10
. // MODELING SECOND STAGE
. 
. eststo clear 

. 
. global X "inc1Xgrowthwara peaceXgrowthwara inc1Xgrowthpeacea peaceXgrowthpeac
> ea inc1Xshrinkwarb peaceXshrinkwarb inc1Xshrinkpeaceb peaceXshrinkpeaceb"

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb"

. global TIMEVARS "noeventyear evspline*"

. 
. 
. reghdfe lnga0 incinita1 llr initXllr llareab $CONTROLS noeventyear evspline* 
> if inc1==1, absorb(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =      1,839
Absorbing 1 HDFE group                            F(  18,     54) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.4670
Number of clusters (idd2)    =        206         Adj R-squared   =     0.4437
Number of clusters (ida)     =         55         Within R-sq.    =     0.4269
Number of clusters (idb)     =         58         Root MSE        =     2.2138

                          (Std. err. adjusted for 55 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   incinita1 |  -4.000191   1.588692    -2.52   0.015    -7.185326   -.8150562
         llr |   1.306139   1.125434     1.16   0.251    -.9502197    3.562498
    initXllr |   4.820679   1.740903     2.77   0.008     1.330378     8.31098
     llareab |   .2692785   .0661126     4.07   0.000     .1367308    .4018262
      lldist |  -.1758081   .1105419    -1.59   0.118    -.3974313    .0458151
      lneigh |   .8492387   .5807182     1.46   0.149    -.3150312    2.013509
   lcoastala |   .2106977   .2342535     0.90   0.372    -.2589523    .6803477
   lcoastalb |  -1.038476   .2760815    -3.76   0.000    -1.591986   -.4849664
      llagea |  -.2848973   .5437409    -0.52   0.602    -1.375032    .8052374
      llageb |  -.4803043   .2623503    -1.83   0.073    -1.006285    .0456764
llnumneighsa |  -.1742013   .1307382    -1.33   0.188    -.4363156     .087913
llnumneighsb |  -.1648934   .1129999    -1.46   0.150    -.3914445    .0616577
   llelevsda |   .0791969   .0825875     0.96   0.342    -.0863812    .2447749
   llelevsdb |   .1169961    .108711     1.08   0.287    -.1009564    .3349486
 noeventyear |  -.1022485   .0118747    -8.61   0.000    -.1260558   -.0784411
   evspline1 |  -.0000392   6.83e-06    -5.74   0.000    -.0000528   -.0000255
   evspline2 |   .0000209   4.63e-06     4.51   0.000     .0000116    .0000302
   evspline3 |  -3.90e-06   1.48e-06    -2.64   0.011    -6.86e-06   -9.43e-07
       _cons |   3.868219   3.842699     1.01   0.319    -3.835928    11.57237
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local sampledef "War"

added macro:
          e(sampledef) : "War"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m1

. 
. reghdfe lnga0  incinita1 llr initXllr inc1 llareab $CONTROLS $TIMEVARS, absor
> b(year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  19,    423) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.1622
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.1622
Number of clusters (ida)     =        424         Within R-sq.    =     0.1619
Number of clusters (idb)     =        424         Root MSE        =     0.1618

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   incinita1 |  -2.560197   .9794499    -2.61   0.009    -4.485392    -.635002
         llr |   .0657418    .014754     4.46   0.000     .0367416    .0947421
    initXllr |   4.095964   .8264325     4.96   0.000     2.471539     5.72039
        inc1 |   .7755609   .1895028     4.09   0.000     .4030764    1.148045
     llareab |   .0069692   .0014454     4.82   0.000     .0041281    .0098104
      lldist |  -.0078286   .0015564    -5.03   0.000    -.0108879   -.0047694
      lneigh |   .0730578   .0114798     6.36   0.000     .0504933    .0956224
   lcoastala |   .0155364   .0044501     3.49   0.001     .0067893    .0242835
   lcoastalb |   .0029131   .0032571     0.89   0.372     -.003489    .0093153
      llagea |   .1238796   .0152544     8.12   0.000     .0938958    .1538634
      llageb |   .1222692    .015085     8.11   0.000     .0926182    .1519201
llnumneighsa |  -.0042788   .0025757    -1.66   0.097    -.0093416     .000784
llnumneighsb |  -.0061194   .0024056    -2.54   0.011    -.0108479   -.0013909
   llelevsda |  -.0024879   .0007351    -3.38   0.001    -.0039328    -.001043
   llelevsdb |  -.0013601   .0004899    -2.78   0.006    -.0023231   -.0003972
 noeventyear |  -.0138717   .0018192    -7.63   0.000    -.0174474    -.010296
   evspline1 |  -3.51e-06   4.87e-07    -7.21   0.000    -4.47e-06   -2.55e-06
   evspline2 |   1.60e-06   2.27e-07     7.04   0.000     1.15e-06    2.05e-06
   evspline3 |  -1.93e-07   3.00e-08    -6.43   0.000    -2.52e-07   -1.34e-07
       _cons |  -1.054775    .131217    -8.04   0.000    -1.312693    -.796856
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local sampledef "All"

added macro:
          e(sampledef) : "All"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "No"

added macro:
             e(dyadfe) : "No"

. estimates store m2

. 
. reghdfe lnga0  incinita1 inc1 $X llareaa llareab $CONTROLS $TIMEVARS, absorb(
> year) cluster(idd2 ida idb)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  26,    423) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.1663
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.1663
Number of clusters (ida)     =        424         Within R-sq.    =     0.1660
Number of clusters (idb)     =        424         Root MSE        =     0.1614

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   incinita1 |   1.102988   .1225946     9.00   0.000     .8620172    1.343958
        inc1 |  -.0393782   .2138223    -0.18   0.854    -.4596647    .3809083
inc1Xgrow~ra |   .0750991   .0287116     2.62   0.009     .0186639    .1315342
peaceXgro~ra |  -.0001072   .0005472    -0.20   0.845    -.0011828    .0009684
inc1Xgrow~ea |  -.0069191   .0327089    -0.21   0.833    -.0712113    .0573731
peaceXgro~ea |   .0021147   .0004155     5.09   0.000     .0012981    .0029314
inc1Xshri~rb |   .0859288   .0366811     2.34   0.020     .0138289    .1580288
peaceXshr~rb |  -.0011449   .0006269    -1.83   0.068    -.0023771    .0000872
inc1Xshri~eb |    .010118   .0402939     0.25   0.802    -.0690832    .0893192
peaceXshr~eb |   .0006861   .0004152     1.65   0.099      -.00013    .0015022
     llareaa |    .001295   .0008125     1.59   0.112     -.000302     .002892
     llareab |   .0035896   .0009554     3.76   0.000     .0017116    .0054676
      lldist |  -.0080843   .0016567    -4.88   0.000    -.0113407   -.0048279
      lneigh |   .0717079   .0110224     6.51   0.000     .0500425    .0933733
   lcoastala |   .0083644   .0035489     2.36   0.019     .0013888      .01534
   lcoastalb |   .0031257   .0030501     1.02   0.306    -.0028696    .0091211
      llagea |   .1215767   .0150803     8.06   0.000     .0919351    .1512183
      llageb |    .121082    .015087     8.03   0.000     .0914271    .1507368
llnumneighsa |  -.0055068   .0024366    -2.26   0.024    -.0102962   -.0007174
llnumneighsb |  -.0066298   .0024065    -2.75   0.006      -.01136   -.0018997
   llelevsda |  -.0009286   .0004527    -2.05   0.041    -.0018183   -.0000388
   llelevsdb |  -.0014029   .0005138    -2.73   0.007    -.0024128   -.0003931
 noeventyear |  -.0138069   .0018192    -7.59   0.000    -.0173827   -.0102311
   evspline1 |  -3.50e-06   4.87e-07    -7.19   0.000    -4.46e-06   -2.54e-06
   evspline2 |   1.60e-06   2.27e-07     7.02   0.000     1.15e-06    2.04e-06
   evspline3 |  -1.94e-07   3.01e-08    -6.45   0.000    -2.53e-07   -1.35e-07
       _cons |   -.972948   .1225723    -7.94   0.000    -1.213875   -.7320214
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. estadd local sampledef "All"

added macro:
          e(sampledef) : "All"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m3

. 
. reghdfe lnga0  incinita1 inc1 $X llareaa llareab $CONTROLS $TIMEVARS, absorb(
> year idd) cluster(idd2 ida idb)
(dropped 14680 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,293,989
Absorbing 2 HDFE groups                           F(  26,    395) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.4030
Number of clusters (idd2)    =     66,846         Adj R-squared   =     0.3777
Number of clusters (ida)     =        396         Within R-sq.    =     0.0554
Number of clusters (idb)     =        396         Root MSE        =     0.1382

                         (Std. err. adjusted for 396 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   incinita1 |   .5489449   .0915969     5.99   0.000     .3688666    .7290233
        inc1 |  -.2542288    .189627    -1.34   0.181    -.6270333    .1185756
inc1Xgrow~ra |   .0532295   .0171747     3.10   0.002     .0194643    .0869946
peaceXgro~ra |   .0007269   .0007424     0.98   0.328    -.0007326    .0021865
inc1Xgrow~ea |   .0085744   .0260371     0.33   0.742    -.0426141     .059763
peaceXgro~ea |    .002153   .0005317     4.05   0.000     .0011076    .0031984
inc1Xshri~rb |   .0460605   .0165129     2.79   0.006     .0135963    .0785247
peaceXshr~rb |  -.0006099   .0006678    -0.91   0.362    -.0019227     .000703
inc1Xshri~eb |   .0109488   .0176563     0.62   0.536    -.0237633    .0456609
peaceXshr~eb |  -.0002022   .0004219    -0.48   0.632    -.0010317    .0006273
     llareaa |  -.0084021   .0032067    -2.62   0.009    -.0147065   -.0020977
     llareab |   .0032213   .0026941     1.20   0.233    -.0020753    .0085179
      lldist |  -.0367123   .0063037    -5.82   0.000    -.0491052   -.0243194
      lneigh |   .1030522   .0325343     3.17   0.002     .0390902    .1670142
   lcoastala |   .0127984    .006527     1.96   0.051    -.0000336    .0256305
   lcoastalb |  -.0181268   .0067391    -2.69   0.007    -.0313758   -.0048778
      llagea |   .1500919   .0251492     5.97   0.000     .1006487     .199535
      llageb |   .1508652   .0253243     5.96   0.000      .101078    .2006525
llnumneighsa |   -.005793   .0034901    -1.66   0.098    -.0126545    .0010686
llnumneighsb |  -.0050698   .0051832    -0.98   0.329    -.0152598    .0051203
   llelevsda |  -.0025248   .0022089    -1.14   0.254    -.0068676    .0018179
   llelevsdb |  -.0044821   .0020341    -2.20   0.028     -.008481   -.0004831
 noeventyear |  -.0096092   .0014574    -6.59   0.000    -.0124743   -.0067441
   evspline1 |  -2.30e-06   3.77e-07    -6.12   0.000    -3.04e-06   -1.56e-06
   evspline2 |   9.75e-07   1.61e-07     6.05   0.000     6.58e-07    1.29e-06
   evspline3 |  -9.13e-08   1.69e-08    -5.41   0.000    -1.24e-07   -5.81e-08
       _cons |  -1.270394    .265796    -4.78   0.000    -1.792946   -.7478422
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133652      133652           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. estadd local sampledef "All"

added macro:
          e(sampledef) : "All"

. estadd local geocontrols "Yes"

added macro:
        e(geocontrols) : "Yes"

. estadd local yearfe "Yes"

added macro:
             e(yearfe) : "Yes"

. estadd local dyadfe "Yes"

added macro:
             e(dyadfe) : "Yes"

. estimates store m4

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. estimates save "dyads_gainsinwar.ster", replace
file dyads_gainsinwar.ster saved

. 
. esttab m1 m2 m3 m4 using "dyads_gainsinwar.tex", replace /// 
> b(4) se label pr2 star(+ 0.1 * 0.05 ** 0.01 *** 0.001) ///
> nogaps eqlabels(none) obslast nomtitles ///
> title("Dyadic gains \label{tab:dyad_2ndphase}") ///
> order (inc1 incinita1 llr initXllr $X  llareaa llareab) /// $CONTROLS) ///
> keep (inc1 incinita1 llr initXllr $X  llareaa llareab) /// $CONTROLS) ///
>  nonotes addnotes("Standard errors clustered on states and dyads in parenthes
> es." /// 
>  "$^{+}p<0.1$; $^{*}p<0.05$; $^{**}p<0.01.$; $^{***}p<0.001.$ ") ///
>       scalars("sampledef Sample" "geocontrols Geo. Controls" "yearfe Year FE"
>  "dyadfe Dyad FE")
(output written to dyads_gainsinwar.tex)

.  
.  
.  
. // INTERACTION PLOTS BASED ON MODELS 3 AND 4 IN FIRST MAIN TABLE 
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $OUTPUTDIR 
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/Output

. global PLOTOPTS "title("") legend(order(1 "Peace" 2 "War")) plot1opts(lcolor(
> black) lpattern(dash)) plot2opts(lcolor(black))  ci1opts(color("102 205 0%50"
> )) ci2opts(color(red%80)) graphregion(color(white)) bgcolor(white)" 

. global X1 "inc1##c.llgrowthwara inc1##c.llgrowthpeacea inc1##c.llshrinkwarb i
> nc1##c.llshrinkpeaceb"  // version for plots

. global CONTROLS "lldist lneigh lcoastala lcoastalb llagea llageb llnumneighsa
>  llnumneighsb  llelevsda llelevsdb" 

. global RANGE "(0(1)14)"

. global PARAMS " lldist=5.3 lneigh=1 llnumneighsa=2 llnumneighsb=2 llareab==6.
> 3 llelevsda=3.3 llelevsdb=3.3 llagea=4.5 llageb=4.5 lcoastala=1 lcoastalb=0 "

. 
. // GENERATE FIGURE 11
. reghdfe lnga0 inc1##c.llr llareab $CONTROLS, absorb(year) cluster(idd2 ida id
> b)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  14,    423) =      26.73
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.0816
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.0816
Number of clusters (ida)     =        424         Within R-sq.    =     0.0813
Number of clusters (idb)     =        424         Root MSE        =     0.1694

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |  -.4217511   .2145314    -1.97   0.050    -.8434315   -.0000707
         llr |   .0862328   .0206723     4.17   0.000     .0455996    .1268661
             |
  inc1#c.llr |
          1  |   1.923483   .4862694     3.96   0.000     .9676781    2.879289
             |
     llareab |   .0095405    .001956     4.88   0.000     .0056959    .0133851
      lldist |  -.0119789   .0023643    -5.07   0.000    -.0166262   -.0073316
      lneigh |    .123945    .019183     6.46   0.000     .0862391    .1616509
   lcoastala |   .0210942   .0047864     4.41   0.000     .0116861    .0305023
   lcoastalb |   .0050889   .0033227     1.53   0.126    -.0014421    .0116199
      llagea |   .0017045   .0007844     2.17   0.030     .0001628    .0032463
      llageb |  -.0001386   .0005755    -0.24   0.810    -.0012698    .0009926
llnumneighsa |  -.0049668   .0025308    -1.96   0.050    -.0099413    7.79e-06
llnumneighsb |  -.0071083   .0024991    -2.84   0.005    -.0120204   -.0021961
   llelevsda |  -.0029018   .0009127    -3.18   0.002    -.0046957   -.0011078
   llelevsdb |  -.0017364   .0005244    -3.31   0.001    -.0027671   -.0007057
       _cons |  -.0387375   .0173285    -2.24   0.026    -.0727982   -.0046768
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

.  
. margins inc1, at (llr = (0.1(0.1)1)  $PARAMS)

Adjusted predictions                                 Number of obs = 3,308,669
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llr          =  .1
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
2._at:  llr          =  .2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
3._at:  llr          =  .3
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
4._at:  llr          =  .4
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
5._at:  llr          =  .5
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
6._at:  llr          =  .6
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
7._at:  llr          =  .7
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
8._at:  llr          =  .8
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
9._at:  llr          =  .9
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
10._at: llr          =   1
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .0791327   .0169121     4.68   0.000     .0459857    .1122797
        1 1  |    -.15027   .1737802    -0.86   0.387    -.4908729    .1903328
        2 0  |    .087756   .0167727     5.23   0.000     .0548822    .1206298
        2 1  |   .0507016   .1325953     0.38   0.702    -.2091804    .3105835
        3 0  |   .0963793   .0168871     5.71   0.000     .0632811    .1294774
        3 1  |   .2516732   .0988692     2.55   0.011     .0578932    .4454532
        4 0  |   .1050026   .0172503     6.09   0.000     .0711926    .1388125
        4 1  |   .4526448    .082343     5.50   0.000     .2912555    .6140342
        5 0  |   .1136258   .0178471     6.37   0.000     .0786462    .1486055
        5 1  |   .6536164   .0927216     7.05   0.000     .4718855    .8353474
        6 0  |   .1222491   .0186551     6.55   0.000     .0856859    .1588124
        6 1  |   .8545881   .1233931     6.93   0.000     .6127421    1.096434
        7 0  |   .1308724   .0196482     6.66   0.000     .0923627    .1693821
        7 1  |    1.05556   .1632975     6.46   0.000     .7355025    1.375617
        8 0  |   .1394957   .0207999     6.71   0.000     .0987286    .1802628
        8 1  |   1.256531   .2071665     6.07   0.000     .8504925     1.66257
        9 0  |    .148119   .0220855     6.71   0.000     .1048321    .1914058
        9 1  |   1.457503   .2529456     5.76   0.000     .9617387    1.953267
       10 0  |   .1567423    .023483     6.67   0.000     .1107164    .2027681
       10 1  |   1.658475    .299761     5.53   0.000     1.070954    2.245995
------------------------------------------------------------------------------

. marginsplot, xlab(0.1(0.1)1) recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llr inc1

. graph export dyads_llr.png, replace 
file dyads_llr.png written in PNG format

. 
. 
. 
. 
. reghdfe lnga0 $X1 llareaa llareab $CONTROLS, absorb(year) cluster(idd2 ida id
> b)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  21,    423) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.0885
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.0885
Number of clusters (ida)     =        424         Within R-sq.    =     0.0882
Number of clusters (idb)     =        424         Root MSE        =     0.1688

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |   .1912052   .2243837     0.85   0.395    -.2498406     .632251
llgrowthwara |   .0013206   .0006387     2.07   0.039     .0000652     .002576
             |
        inc1#|
          c. |
llgrowthwara |
          1  |   .1052983   .0282323     3.73   0.000     .0498051    .1607914
             |
llgrowthpe~a |   .0015597   .0003321     4.70   0.000      .000907    .0022125
             |
        inc1#|
          c. |
llgrowthpe~a |
          1  |  -.0107814   .0316485    -0.34   0.734    -.0729893    .0514265
             |
llshrinkwarb |   .0000391    .000511     0.08   0.939    -.0009653    .0010435
             |
        inc1#|
          c. |
llshrinkwarb |
          1  |   .0982405   .0403552     2.43   0.015     .0189188    .1775621
             |
llshrinkpe~b |   .0012907   .0004278     3.02   0.003     .0004499    .0021316
             |
        inc1#|
          c. |
llshrinkpe~b |
          1  |   .0103008   .0435742     0.24   0.813    -.0753481    .0959496
             |
     llareaa |   .0023908   .0007721     3.10   0.002     .0008731    .0039084
     llareab |   .0043847   .0010466     4.19   0.000     .0023275    .0064419
      lldist |  -.0121976   .0024552    -4.97   0.000    -.0170235   -.0073717
      lneigh |   .1217927   .0189942     6.41   0.000     .0844579    .1591275
   lcoastala |   .0095033   .0031539     3.01   0.003      .003304    .0157027
   lcoastalb |   .0031125   .0027843     1.12   0.264    -.0023604    .0085853
      llagea |   3.35e-06   .0004734     0.01   0.994    -.0009271    .0009338
      llageb |  -.0008906   .0005572    -1.60   0.111    -.0019858    .0002045
llnumneighsa |  -.0064054    .002523    -2.54   0.011    -.0113645   -.0014462
llnumneighsb |  -.0079094   .0025771    -3.07   0.002    -.0129749   -.0028439
   llelevsda |  -.0009246   .0004181    -2.21   0.028    -.0017464   -.0001029
   llelevsdb |  -.0015655   .0005102    -3.07   0.002    -.0025683   -.0005626
       _cons |   .0592514   .0169486     3.50   0.001     .0259375    .0925654
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. 
. // GENERATE FIGURE 12a
. margins inc1, at (llgrowthwara = $RANGE llareaa=6.2 llareab=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,308,669
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llgrowthwara =   0
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
2._at:  llgrowthwara =   0
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
3._at:  llgrowthwara =   1
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
4._at:  llgrowthwara =   1
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
5._at:  llgrowthwara =   2
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
6._at:  llgrowthwara =   2
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
7._at:  llgrowthwara =   3
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
8._at:  llgrowthwara =   3
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
9._at:  llgrowthwara =   4
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
10._at: llgrowthwara =   4
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
11._at: llgrowthwara =   5
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
12._at: llgrowthwara =   5
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
13._at: llgrowthwara =   6
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
14._at: llgrowthwara =   6
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
15._at: llgrowthwara =   7
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
16._at: llgrowthwara =   7
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
17._at: llgrowthwara =   8
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
18._at: llgrowthwara =   8
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
19._at: llgrowthwara =   9
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
20._at: llgrowthwara =   9
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
21._at: llgrowthwara =  10
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
22._at: llgrowthwara =  10
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
23._at: llgrowthwara =  11
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
24._at: llgrowthwara =  11
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
25._at: llgrowthwara =  12
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
26._at: llgrowthwara =  12
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
27._at: llgrowthwara =  13
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
28._at: llgrowthwara =  13
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
29._at: llgrowthwara =  14
        llareaa      = 6.2
        llareab      = 6.2
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
30._at: llgrowthwara =  14
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1316506   .0201653     6.53   0.000     .0921274    .1711738
        1 1  |   .3523817   .1774791     1.99   0.047     .0045291    .7002343
        2 0  |   .1320891    .020206     6.54   0.000     .0924862     .171692
        2 1  |   .3528202   .1774739     1.99   0.047     .0049778    .7006626
        3 0  |   .1329712   .0202309     6.57   0.000     .0933193    .1726231
        3 1  |   .4590006   .1750526     2.62   0.009     .1159038    .8020974
        4 0  |   .1334097   .0202715     6.58   0.000     .0936784     .173141
        4 1  |    .459439   .1750507     2.62   0.009      .116346    .8025321
        5 0  |   .1342918   .0203165     6.61   0.000     .0944723    .1741114
        5 1  |   .5656194   .1772093     3.19   0.001     .2182955    .9129433
        6 0  |   .1347303   .0203568     6.62   0.000     .0948317    .1746289
        6 1  |   .5660579   .1772107     3.19   0.001     .2187312    .9133846
        7 0  |   .1356124   .0204216     6.64   0.000     .0955867    .1756381
        7 1  |   .6722383    .183788     3.66   0.000     .3120205    1.032456
        8 0  |   .1360509   .0204618     6.65   0.000     .0959466    .1761552
        8 1  |   .6726768   .1837925     3.66   0.000       .31245    1.032904
        9 0  |    .136933   .0205461     6.66   0.000     .0966633    .1772027
        9 1  |   .7788571     .19434     4.01   0.000     .3979578    1.159757
       10 0  |   .1373715    .020586     6.67   0.000     .0970237    .1777193
       10 1  |   .7792956   .1943473     4.01   0.000     .3983818    1.160209
       11 0  |   .1382536   .0206896     6.68   0.000     .0977027    .1788045
       11 1  |    .885476   .2082623     4.25   0.000     .4772894    1.293663
       12 0  |   .1386921   .0207292     6.69   0.000     .0980636    .1793205
       12 1  |   .8859145    .208272     4.25   0.000     .4777089     1.29412
       13 0  |   .1395742   .0208517     6.69   0.000     .0987057    .1804427
       13 1  |   .9920949     .22493     4.41   0.000     .5512403    1.432949
       14 0  |   .1400127   .0208909     6.70   0.000     .0990673    .1809581
       14 1  |   .9925333   .2249415     4.41   0.000      .551656    1.433411
       15 0  |   .1408948   .0210319     6.70   0.000     .0996731    .1821165
       15 1  |   1.098714   .2437805     4.51   0.000     .6209128    1.576515
       16 0  |   .1413333   .0210708     6.71   0.000     .1000353    .1826312
       16 1  |   1.099152   .2437936     4.51   0.000     .6213256    1.576979
       17 0  |   .1422154   .0212298     6.70   0.000     .1006058    .1838249
       17 1  |   1.205333   .2643473     4.56   0.000     .6872214    1.723444
       18 0  |   .1426538   .0212683     6.71   0.000     .1009688    .1843389
       18 1  |   1.205771   .2643616     4.56   0.000     .6876318     1.72391
       19 0  |    .143536   .0214449     6.69   0.000     .1015048    .1855671
       19 1  |   1.311951   .2862607     4.58   0.000     .7508907    1.873012
       20 0  |   .1439744    .021483     6.70   0.000     .1018686    .1860803
       20 1  |    1.31239    .286276     4.58   0.000     .7512992    1.873481
       21 0  |   .1448566   .0216767     6.68   0.000     .1023711     .187342
       21 1  |    1.41857   .3092347     4.59   0.000     .8124815    2.024659
       22 0  |    .145295   .0217143     6.69   0.000     .1027357    .1878544
       22 1  |   1.419009   .3092507     4.59   0.000     .8128885    2.025129
       23 0  |   .1461772   .0219246     6.67   0.000     .1032057    .1891486
       23 1  |   1.525189   .3330497     4.58   0.000     .8724238    2.177954
       24 0  |   .1466156   .0219619     6.68   0.000     .1035712    .1896601
       24 1  |   1.525628   .3330663     4.58   0.000     .8728296    2.178426
       25 0  |   .1474977   .0221882     6.65   0.000     .1040097    .1909858
       25 1  |   1.631808   .3575377     4.56   0.000      .931047    2.332569
       26 0  |   .1479362    .022225     6.66   0.000     .1043761    .1914964
       26 1  |   1.632246   .3575549     4.57   0.000     .9314518    2.333041
       27 0  |   .1488183   .0224668     6.62   0.000     .1047842    .1928525
       27 1  |   1.738427   .3825696     4.54   0.000     .9886042    2.488249
       28 0  |   .1492568   .0225031     6.63   0.000     .1051515    .1933622
       28 1  |   1.738865   .3825872     4.55   0.000     .9890083    2.488722
       29 0  |   .1501389     .02276     6.60   0.000     .1055302    .1947477
       29 1  |   1.845046   .4080452     4.52   0.000     1.045292      2.6448
       30 0  |   .1505774   .0227958     6.61   0.000     .1058984    .1952564
       30 1  |   1.845484   .4080632     4.52   0.000     1.045695    2.645273
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llgrowthwara llareab inc1

. graph export dyads_llgrowthwara.png, replace 
file dyads_llgrowthwara.png written in PNG format

. 
. 
. // GENERATE FIGURE 12b
. margins inc1, at (llshrinkwarb = $RANGE llareaa=6.2 llareaa=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,308,669
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llshrinkwarb =   0
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
2._at:  llshrinkwarb =   1
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
3._at:  llshrinkwarb =   2
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
4._at:  llshrinkwarb =   3
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
5._at:  llshrinkwarb =   4
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
6._at:  llshrinkwarb =   5
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
7._at:  llshrinkwarb =   6
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
8._at:  llshrinkwarb =   7
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
9._at:  llshrinkwarb =   8
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
10._at: llshrinkwarb =   9
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
11._at: llshrinkwarb =  10
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
12._at: llshrinkwarb =  11
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
13._at: llshrinkwarb =  12
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
14._at: llshrinkwarb =  13
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
15._at: llshrinkwarb =  14
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1327655   .0202298     6.56   0.000     .0931158    .1724152
        1 1  |   .3732267   .1812594     2.06   0.039     .0179649    .7284885
        2 0  |   .1328045   .0202559     6.56   0.000     .0931037    .1725054
        2 1  |   .4715062   .1682841     2.80   0.005     .1416755    .8013369
        3 0  |   .1328436   .0202948     6.55   0.000     .0930665    .1726208
        3 1  |   .5697858    .164453     3.46   0.001     .2474638    .8921077
        4 0  |   .1328827   .0203465     6.53   0.000     .0930042    .1727611
        4 1  |   .6680653   .1703841     3.92   0.000     .3341186    1.002012
        5 0  |   .1329218   .0204109     6.51   0.000     .0929172    .1729263
        5 1  |   .7663449   .1851416     4.14   0.000     .4034741    1.129216
        6 0  |   .1329608   .0204878     6.49   0.000     .0928055    .1731161
        6 1  |   .8646245   .2068448     4.18   0.000     .4592162    1.270033
        7 0  |   .1329999   .0205771     6.46   0.000     .0926696    .1733303
        7 1  |    .962904   .2335654     4.12   0.000     .5051242    1.420684
        8 0  |    .133039   .0206786     6.43   0.000     .0925096    .1735684
        8 1  |   1.061184   .2637831     4.02   0.000     .5441781    1.578189
        9 0  |   .1330781   .0207923     6.40   0.000      .092326    .1738301
        9 1  |   1.159463   .2964304     3.91   0.000     .5784702    1.740456
       10 0  |   .1331171   .0209177     6.36   0.000     .0921191    .1741151
       10 1  |   1.257743   .3307886     3.80   0.000     .6094089    1.906076
       11 0  |   .1331562   .0210549     6.32   0.000     .0918894     .174423
       11 1  |   1.356022   .3663768     3.70   0.000      .637937    2.074108
       12 0  |   .1331953   .0212035     6.28   0.000     .0916373    .1747533
       12 1  |   1.454302    .402869     3.61   0.000      .664693    2.243911
       13 0  |   .1332344   .0213632     6.24   0.000     .0913632    .1751055
       13 1  |   1.552581   .4400405     3.53   0.000     .6901177    2.415045
       14 0  |   .1332734   .0215339     6.19   0.000     .0910677    .1754792
       14 1  |   1.650861   .4777328     3.46   0.001     .7145219      2.5872
       15 0  |   .1333125   .0217153     6.14   0.000     .0907512    .1758738
       15 1  |    1.74914   .5158316     3.39   0.001     .7381292    2.760152
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llshrinkwarb inc1

. graph export dyads_llshrinkwarb.png, replace 
file dyads_llshrinkwarb.png written in PNG format

. 
. 
. 
. // APPENDIX: INTERACTION PLOTS WITH DYAD FE
. 
. reghdfe lnga0 $X1 llareaa llareab $CONTROLS, absorb(year idd) cluster(idd2 id
> a idb)
(dropped 14680 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,293,989
Absorbing 2 HDFE groups                           F(  21,    395) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.3873
Number of clusters (idd2)    =     66,846         Adj R-squared   =     0.3613
Number of clusters (ida)     =        396         Within R-sq.    =     0.0306
Number of clusters (idb)     =        396         Root MSE        =     0.1400

                         (Std. err. adjusted for 396 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |  -.1947415   .2021486    -0.96   0.336    -.5921631    .2026801
llgrowthwara |   .0014178   .0008694     1.63   0.104    -.0002916    .0031271
             |
        inc1#|
          c. |
llgrowthwara |
          1  |   .0644161   .0178806     3.60   0.000     .0292631    .0995691
             |
llgrowthpe~a |   .0011218   .0003422     3.28   0.001      .000449    .0017947
             |
        inc1#|
          c. |
llgrowthpe~a |
          1  |   .0071431   .0264908     0.27   0.788    -.0449374    .0592237
             |
llshrinkwarb |  -.0000569   .0005516    -0.10   0.918    -.0011414    .0010275
             |
        inc1#|
          c. |
llshrinkwarb |
          1  |   .0503855   .0164389     3.07   0.002     .0180669     .082704
             |
llshrinkpe~b |   .0004035   .0003231     1.25   0.212    -.0002318    .0010388
             |
        inc1#|
          c. |
llshrinkpe~b |
          1  |   .0118868   .0175397     0.68   0.498    -.0225961    .0463697
             |
     llareaa |  -.0063699   .0029423    -2.16   0.031    -.0121543   -.0005854
     llareab |   .0049467   .0027092     1.83   0.069    -.0003795    .0102729
      lldist |  -.0463788   .0074617    -6.22   0.000    -.0610484   -.0317091
      lneigh |   .1137544    .034721     3.28   0.001     .0454933    .1820154
   lcoastala |   .0128118   .0064676     1.98   0.048     .0000967     .025527
   lcoastalb |  -.0173326   .0067394    -2.57   0.010    -.0305822   -.0040831
      llagea |   .0018632   .0008742     2.13   0.034     .0001446    .0035819
      llageb |   .0016999    .000882     1.93   0.055    -.0000341    .0034339
llnumneighsa |  -.0060243   .0033358    -1.81   0.072    -.0125824    .0005338
llnumneighsb |  -.0058755   .0052512    -1.12   0.264    -.0161992    .0044483
   llelevsda |  -.0011462   .0018477    -0.62   0.535    -.0047788    .0024864
   llelevsdb |  -.0033822    .001577    -2.14   0.033    -.0064826   -.0002819
       _cons |   .2716981   .0457842     5.93   0.000     .1816868    .3617093
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133652      133652           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. 
. // GENERATE FIGURE A8a 
. margins inc1, at (llgrowthwara = $RANGE llareaa=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,293,989
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llgrowthwara =   0
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
2._at:  llgrowthwara =   1
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
3._at:  llgrowthwara =   2
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
4._at:  llgrowthwara =   3
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
5._at:  llgrowthwara =   4
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
6._at:  llgrowthwara =   5
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
7._at:  llgrowthwara =   6
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
8._at:  llgrowthwara =   7
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
9._at:  llgrowthwara =   8
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
10._at: llgrowthwara =   9
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
11._at: llgrowthwara =  10
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
12._at: llgrowthwara =  11
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
13._at: llgrowthwara =  12
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
14._at: llgrowthwara =  13
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
15._at: llgrowthwara =  14
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1239862   .0343959     3.60   0.000     .0565716    .1914008
        1 1  |   -.023579   .1649692    -0.14   0.886    -.3469126    .2997546
        2 0  |    .125404   .0343194     3.65   0.000     .0581391    .1926688
        2 1  |   .0422549   .1712859     0.25   0.805    -.2934593    .3779691
        3 0  |   .1268217   .0342649     3.70   0.000     .0596638    .1939797
        3 1  |   .1080887   .1791622     0.60   0.546    -.2430628    .4592403
        4 0  |   .1282395   .0342324     3.75   0.000     .0611453    .1953337
        4 1  |   .1739226   .1884026     0.92   0.356    -.1953397     .543185
        5 0  |   .1296573   .0342219     3.79   0.000     .0625836    .1967309
        5 1  |   .2397565    .198817     1.21   0.228    -.1499176    .6294306
        6 0  |    .131075   .0342335     3.83   0.000     .0639786    .1981715
        6 1  |   .3055904   .2102309     1.45   0.146    -.1064547    .7176354
        7 0  |   .1324928   .0342672     3.87   0.000     .0653304    .1996553
        7 1  |   .3714242   .2224906     1.67   0.095    -.0646494    .8074979
        8 0  |   .1339106   .0343229     3.90   0.000      .066639    .2011822
        8 1  |   .4372581   .2354641     1.86   0.063     -.024243    .8987592
        9 0  |   .1353283   .0344004     3.93   0.000     .0679047     .202752
        9 1  |    .503092   .2490397     2.02   0.043     .0149831    .9912009
       10 0  |   .1367461   .0344998     3.96   0.000     .0691278    .2043644
       10 1  |   .5689258   .2631244     2.16   0.031     .0532115     1.08464
       11 0  |   .1381639   .0346206     3.99   0.000     .0703087     .206019
       11 1  |   .6347597   .2776406     2.29   0.022     .0905942    1.178925
       12 0  |   .1395816   .0347628     4.02   0.000     .0714478    .2077155
       12 1  |   .7005936   .2925241     2.39   0.017     .1272569     1.27393
       13 0  |   .1409994   .0349261     4.04   0.000     .0725455    .2094533
       13 1  |   .7664275   .3077217     2.49   0.013     .1633041    1.369551
       14 0  |   .1424172   .0351102     4.06   0.000     .0736026    .2112318
       14 1  |   .8322613   .3231889     2.58   0.010     .1988227      1.4657
       15 0  |   .1438349   .0353147     4.07   0.000     .0746195    .2130504
       15 1  |   .8980952    .338889     2.65   0.008      .233885    1.562305
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea)  $PLOTOPTS

Variables that uniquely identify margins: llgrowthwara inc1

. graph export dyads_llgrowthwaraFE.png, replace 
file dyads_llgrowthwaraFE.png written in PNG format

. 
. // GENERATE FIGURE A8b
. margins inc1, at (llshrinkwarb = $RANGE llareaa=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,293,989
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llshrinkwarb =   0
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
2._at:  llshrinkwarb =   1
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
3._at:  llshrinkwarb =   2
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
4._at:  llshrinkwarb =   3
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
5._at:  llshrinkwarb =   4
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
6._at:  llshrinkwarb =   5
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
7._at:  llshrinkwarb =   6
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
8._at:  llshrinkwarb =   7
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
9._at:  llshrinkwarb =   8
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
10._at: llshrinkwarb =   9
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
11._at: llshrinkwarb =  10
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
12._at: llshrinkwarb =  11
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
13._at: llshrinkwarb =  12
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
14._at: llshrinkwarb =  13
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3
15._at: llshrinkwarb =  14
        llareaa      = 6.2
        llareab      = 6.3
        lldist       = 5.3
        lneigh       =   1
        lcoastala    =   1
        lcoastalb    =   0
        llagea       = 4.5
        llageb       = 4.5
        llnumneighsa =   2
        llnumneighsb =   2
        llelevsda    = 3.3
        llelevsdb    = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1247497   .0343627     3.63   0.000     .0574001    .1920993
        1 1  |  -.0072229   .1704774    -0.04   0.966    -.3413524    .3269066
        2 0  |   .1246928   .0343389     3.63   0.000     .0573898    .1919958
        2 1  |   .0431056   .1642573     0.26   0.793    -.2788328    .3650441
        3 0  |   .1246359    .034324     3.63   0.000     .0573622    .1919096
        3 1  |   .0934342   .1595231     0.59   0.558    -.2192254    .4060937
        4 0  |    .124579   .0343179     3.63   0.000     .0573172    .1918408
        4 1  |   .1437627   .1564097     0.92   0.358    -.1627947    .4503201
        5 0  |   .1245221   .0343207     3.63   0.000     .0572548    .1917894
        5 1  |   .1940913   .1550148     1.25   0.211    -.1097322    .4979147
        6 0  |   .1244652   .0343323     3.63   0.000      .057175    .1917553
        6 1  |   .2444198   .1553847     1.57   0.116    -.0601286    .5489682
        7 0  |   .1244083   .0343529     3.62   0.000     .0570779    .1917386
        7 1  |   .2947484    .157507     1.87   0.061    -.0139596    .6034563
        8 0  |   .1243513   .0343822     3.62   0.000     .0569635    .1917392
        8 1  |   .3450769   .1613124     2.14   0.032     .0289103    .6612435
        9 0  |   .1242944   .0344204     3.61   0.000     .0568317    .1917571
        9 1  |   .3954054   .1666859     2.37   0.018     .0687071    .7221038
       10 0  |   .1242375   .0344673     3.60   0.000     .0566828    .1917922
       10 1  |    .445734   .1734817     2.57   0.010     .1057162    .7857518
       11 0  |   .1241806    .034523     3.60   0.000     .0565167    .1918445
       11 1  |   .4960625   .1815401     2.73   0.006     .1402505    .8518746
       12 0  |   .1241237   .0345874     3.59   0.000     .0563336    .1919138
       12 1  |   .5463911   .1907012     2.87   0.004     .1726235    .9201586
       13 0  |   .1240668   .0346605     3.58   0.000     .0561334    .1920002
       13 1  |   .5967196   .2008142     2.97   0.003     .2031311    .9903081
       14 0  |   .1240099   .0347422     3.57   0.000     .0559164    .1921033
       14 1  |   .6470482   .2117426     3.06   0.002     .2320404    1.062056
       15 0  |    .123953   .0348324     3.56   0.000     .0556827    .1922232
       15 1  |   .6973767   .2233668     3.12   0.002     .2595858    1.135168
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llshrinkwarb inc1

. graph export dyads_llshrinkwarbFE.png, replace 
file dyads_llshrinkwarbFE.png written in PNG format

. 
. 
. // OTHER INTERACTION PLOTS WITH PEACEFUL EFFECTS NOT SHOWN IN PAPER OR IN APP
> ENDIX
. 
. reghdfe lnga0 $X1 llareaa llareab $CONTROLS, absorb(year) cluster(idd2 ida id
> b)
(MWFE estimator converged in 1 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,308,669
Absorbing 1 HDFE group                            F(  21,    423) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.0885
Number of clusters (idd2)    =     74,202         Adj R-squared   =     0.0885
Number of clusters (ida)     =        424         Within R-sq.    =     0.0882
Number of clusters (idb)     =        424         Root MSE        =     0.1688

                         (Std. err. adjusted for 424 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |   .1912052   .2243837     0.85   0.395    -.2498406     .632251
llgrowthwara |   .0013206   .0006387     2.07   0.039     .0000652     .002576
             |
        inc1#|
          c. |
llgrowthwara |
          1  |   .1052983   .0282323     3.73   0.000     .0498051    .1607914
             |
llgrowthpe~a |   .0015597   .0003321     4.70   0.000      .000907    .0022125
             |
        inc1#|
          c. |
llgrowthpe~a |
          1  |  -.0107814   .0316485    -0.34   0.734    -.0729893    .0514265
             |
llshrinkwarb |   .0000391    .000511     0.08   0.939    -.0009653    .0010435
             |
        inc1#|
          c. |
llshrinkwarb |
          1  |   .0982405   .0403552     2.43   0.015     .0189188    .1775621
             |
llshrinkpe~b |   .0012907   .0004278     3.02   0.003     .0004499    .0021316
             |
        inc1#|
          c. |
llshrinkpe~b |
          1  |   .0103008   .0435742     0.24   0.813    -.0753481    .0959496
             |
     llareaa |   .0023908   .0007721     3.10   0.002     .0008731    .0039084
     llareab |   .0043847   .0010466     4.19   0.000     .0023275    .0064419
      lldist |  -.0121976   .0024552    -4.97   0.000    -.0170235   -.0073717
      lneigh |   .1217927   .0189942     6.41   0.000     .0844579    .1591275
   lcoastala |   .0095033   .0031539     3.01   0.003      .003304    .0157027
   lcoastalb |   .0031125   .0027843     1.12   0.264    -.0023604    .0085853
      llagea |   3.35e-06   .0004734     0.01   0.994    -.0009271    .0009338
      llageb |  -.0008906   .0005572    -1.60   0.111    -.0019858    .0002045
llnumneighsa |  -.0064054    .002523    -2.54   0.011    -.0113645   -.0014462
llnumneighsb |  -.0079094   .0025771    -3.07   0.002    -.0129749   -.0028439
   llelevsda |  -.0009246   .0004181    -2.21   0.028    -.0017464   -.0001029
   llelevsdb |  -.0015655   .0005102    -3.07   0.002    -.0025683   -.0005626
       _cons |   .0592514   .0169486     3.50   0.001     .0259375    .0925654
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
-----------------------------------------------------+

. 
. 
. margins inc1, at (llshrinkpeaceb = $RANGE llareaa=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,308,669
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llshrinkpeaceb =   0
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
2._at:  llshrinkpeaceb =   1
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
3._at:  llshrinkpeaceb =   2
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
4._at:  llshrinkpeaceb =   3
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
5._at:  llshrinkpeaceb =   4
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
6._at:  llshrinkpeaceb =   5
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
7._at:  llshrinkpeaceb =   6
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
8._at:  llshrinkpeaceb =   7
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
9._at:  llshrinkpeaceb =   8
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
10._at: llshrinkpeaceb =   9
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
11._at: llshrinkpeaceb =  10
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
12._at: llshrinkpeaceb =  11
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
13._at: llshrinkpeaceb =  12
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
14._at: llshrinkpeaceb =  13
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
15._at: llshrinkpeaceb =  14
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1310484   .0200962     6.52   0.000     .0916606    .1704362
        1 1  |   .3930152   .2088703     1.88   0.060    -.0163631    .8023934
        2 0  |   .1323392   .0202003     6.55   0.000     .0927474    .1719309
        2 1  |   .4046067   .1828776     2.21   0.027     .0461731    .7630403
        3 0  |   .1336299   .0203128     6.58   0.000     .0938175    .1734423
        3 1  |   .4161982   .1646281     2.53   0.011     .0935331    .7388633
        4 0  |   .1349206   .0204337     6.60   0.000     .0948713      .17497
        4 1  |   .4277897    .156848     2.73   0.006     .1203732    .7352062
        5 0  |   .1362114   .0205628     6.62   0.000      .095909    .1765137
        5 1  |   .4393812   .1610619     2.73   0.006     .1237056    .7550567
        6 0  |   .1375021   .0206999     6.64   0.000      .096931    .1780732
        6 1  |   .4509727   .1764123     2.56   0.011     .1052109    .7967345
        7 0  |   .1387928   .0208449     6.66   0.000     .0979375    .1796481
        7 1  |   .4625642   .2003557     2.31   0.021     .0698742    .8552541
        8 0  |   .1400835   .0209976     6.67   0.000      .098929    .1812381
        8 1  |   .4741557   .2302265     2.06   0.039       .02292    .9253913
        9 0  |   .1413743   .0211579     6.68   0.000     .0999056     .182843
        9 1  |   .4857472   .2640205     1.84   0.066    -.0317234    1.003218
       10 0  |    .142665   .0213255     6.69   0.000     .1008678    .1844623
       10 1  |   .4973387   .3004166     1.66   0.098     -.091467    1.086144
       11 0  |   .1439557   .0215004     6.70   0.000     .1018158    .1860957
       11 1  |   .5089302   .3385766     1.50   0.133    -.1546679    1.172528
       12 0  |   .1452465   .0216822     6.70   0.000     .1027501    .1877429
       12 1  |   .5205217   .3779668     1.38   0.168    -.2202797    1.261323
       13 0  |   .1465372    .021871     6.70   0.000     .1036709    .1894035
       13 1  |   .5321132   .4182397     1.27   0.203    -.2876215    1.351848
       14 0  |   .1478279   .0220664     6.70   0.000     .1045786    .1910772
       14 1  |   .5437047    .459163     1.18   0.236    -.3562382    1.443648
       15 0  |   .1491187   .0222683     6.70   0.000     .1054736    .1927637
       15 1  |   .5552962   .5005773     1.11   0.267    -.4258173     1.53641
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llshrinkpeaceb inc1

. graph export dyads_llshrinkoeaceb.png, replace 
file dyads_llshrinkoeaceb.png written in PNG format

. 
. margins inc1, at (llgrowthpeacea = $RANGE llareaa=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,308,669
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llgrowthpeacea =   0
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
2._at:  llgrowthpeacea =   1
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
3._at:  llgrowthpeacea =   2
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
4._at:  llgrowthpeacea =   3
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
5._at:  llgrowthpeacea =   4
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
6._at:  llgrowthpeacea =   5
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
7._at:  llgrowthpeacea =   6
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
8._at:  llgrowthpeacea =   7
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
9._at:  llgrowthpeacea =   8
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
10._at: llgrowthpeacea =   9
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
11._at: llgrowthpeacea =  10
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
12._at: llgrowthpeacea =  11
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
13._at: llgrowthpeacea =  12
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
14._at: llgrowthpeacea =  13
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
15._at: llgrowthpeacea =  14
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1299426        .02     6.50   0.000     .0907433    .1691418
        1 1  |   .4253345   .1960667     2.17   0.030     .0410507    .8096182
        2 0  |   .1315023   .0201288     6.53   0.000     .0920506     .170954
        2 1  |   .4161128   .1828886     2.28   0.023     .0576578    .7745678
        3 0  |    .133062   .0202622     6.57   0.000     .0933488    .1727753
        3 1  |   .4068911    .174514     2.33   0.020     .0648499    .7489323
        4 0  |   .1346218   .0204002     6.60   0.000     .0946382    .1746054
        4 1  |   .3976694   .1716476     2.32   0.021     .0612463    .7340925
        5 0  |   .1361815   .0205426     6.63   0.000     .0959188    .1764442
        5 1  |   .3884477   .1745609     2.23   0.026     .0463146    .7305808
        6 0  |   .1377413   .0206893     6.66   0.000     .0971909    .1782916
        6 1  |    .379226   .1829781     2.07   0.038     .0205956    .7378564
        7 0  |    .139301   .0208403     6.68   0.000     .0984547    .1801473
        7 1  |   .3700043   .1961919     1.89   0.059    -.0145248    .7545334
        8 0  |   .1408607   .0209955     6.71   0.000     .0997103    .1820112
        8 1  |   .3607826    .213313     1.69   0.091    -.0573031    .7788684
        9 0  |   .1424205   .0211548     6.73   0.000     .1009579    .1838831
        9 1  |   .3515609   .2334832     1.51   0.132    -.1060578    .8091797
       10 0  |   .1439802    .021318     6.75   0.000     .1021977    .1857628
       10 1  |   .3423392    .255983     1.34   0.181    -.1593781    .8440566
       11 0  |   .1455399   .0214852     6.77   0.000     .1034298    .1876501
       11 1  |   .3331176   .2802516     1.19   0.235    -.2161655    .8824006
       12 0  |   .1470997   .0216561     6.79   0.000     .1046545    .1895448
       12 1  |   .3238959   .3058685     1.06   0.290    -.2755953     .923387
       13 0  |   .1486594   .0218307     6.81   0.000      .105872    .1914469
       13 1  |   .3146742    .332522     0.95   0.344     -.337057    .9664054
       14 0  |   .1502191    .022009     6.83   0.000     .1070823     .193356
       14 1  |   .3054525   .3599821     0.85   0.396    -.4000996    1.011005
       15 0  |   .1517789   .0221908     6.84   0.000     .1082857    .1952721
       15 1  |   .2962308   .3880776     0.76   0.445    -.4643874    1.056849
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llgrowthpeacea inc1

. graph export dyads_llgrowthpeacea.png, replace 
file dyads_llgrowthpeacea.png written in PNG format

. 
. 
. reghdfe lnga0 $X1 llareaa llareab $CONTROLS, absorb(year idd) cluster(idd2 id
> a idb)
(dropped 14680 singleton observations)
(MWFE estimator converged in 8 iterations)
Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Ge
> lbach & Miller applied.
warning: missing F statistic; dropped variables due to collinearity or too few 
> clusters

HDFE Linear regression                            Number of obs   =  3,293,989
Absorbing 2 HDFE groups                           F(  21,    395) =          .
Statistics robust to heteroskedasticity           Prob > F        =          .
                                                  R-squared       =     0.3873
Number of clusters (idd2)    =     66,846         Adj R-squared   =     0.3613
Number of clusters (ida)     =        396         Within R-sq.    =     0.0306
Number of clusters (idb)     =        396         Root MSE        =     0.1400

                         (Std. err. adjusted for 396 clusters in idd2 ida idb)
------------------------------------------------------------------------------
             |               Robust
       lnga0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      1.inc1 |  -.1947415   .2021486    -0.96   0.336    -.5921631    .2026801
llgrowthwara |   .0014178   .0008694     1.63   0.104    -.0002916    .0031271
             |
        inc1#|
          c. |
llgrowthwara |
          1  |   .0644161   .0178806     3.60   0.000     .0292631    .0995691
             |
llgrowthpe~a |   .0011218   .0003422     3.28   0.001      .000449    .0017947
             |
        inc1#|
          c. |
llgrowthpe~a |
          1  |   .0071431   .0264908     0.27   0.788    -.0449374    .0592237
             |
llshrinkwarb |  -.0000569   .0005516    -0.10   0.918    -.0011414    .0010275
             |
        inc1#|
          c. |
llshrinkwarb |
          1  |   .0503855   .0164389     3.07   0.002     .0180669     .082704
             |
llshrinkpe~b |   .0004035   .0003231     1.25   0.212    -.0002318    .0010388
             |
        inc1#|
          c. |
llshrinkpe~b |
          1  |   .0118868   .0175397     0.68   0.498    -.0225961    .0463697
             |
     llareaa |  -.0063699   .0029423    -2.16   0.031    -.0121543   -.0005854
     llareab |   .0049467   .0027092     1.83   0.069    -.0003795    .0102729
      lldist |  -.0463788   .0074617    -6.22   0.000    -.0610484   -.0317091
      lneigh |   .1137544    .034721     3.28   0.001     .0454933    .1820154
   lcoastala |   .0128118   .0064676     1.98   0.048     .0000967     .025527
   lcoastalb |  -.0173326   .0067394    -2.57   0.010    -.0305822   -.0040831
      llagea |   .0018632   .0008742     2.13   0.034     .0001446    .0035819
      llageb |   .0016999    .000882     1.93   0.055    -.0000341    .0034339
llnumneighsa |  -.0060243   .0033358    -1.81   0.072    -.0125824    .0005338
llnumneighsb |  -.0058755   .0052512    -1.12   0.264    -.0161992    .0044483
   llelevsda |  -.0011462   .0018477    -0.62   0.535    -.0047788    .0024864
   llelevsdb |  -.0033822    .001577    -2.14   0.033    -.0064826   -.0002819
       _cons |   .2716981   .0457842     5.93   0.000     .1816868    .3617093
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        60           0          60     |
         idd |    133652      133652           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. 
. margins inc1, at (llgrowthpeacea = $RANGE llareaa=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,293,989
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llgrowthpeacea =   0
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
2._at:  llgrowthpeacea =   1
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
3._at:  llgrowthpeacea =   2
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
4._at:  llgrowthpeacea =   3
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
5._at:  llgrowthpeacea =   4
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
6._at:  llgrowthpeacea =   5
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
7._at:  llgrowthpeacea =   6
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
8._at:  llgrowthpeacea =   7
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
9._at:  llgrowthpeacea =   8
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
10._at: llgrowthpeacea =   9
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
11._at: llgrowthpeacea =  10
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
12._at: llgrowthpeacea =  11
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
13._at: llgrowthpeacea =  12
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
14._at: llgrowthpeacea =  13
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
15._at: llgrowthpeacea =  14
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1226836   .0342002     3.59   0.000     .0556523    .1897148
        1 1  |  -.0041492   .2064586    -0.02   0.984    -.4088006    .4005022
        2 0  |   .1238054   .0342827     3.61   0.000     .0566125    .1909983
        2 1  |   .0041158   .1848288     0.02   0.982     -.358142    .3663735
        3 0  |   .1249272   .0343684     3.63   0.000     .0575663    .1922882
        3 1  |   .0123808   .1646362     0.08   0.940    -.3103003    .3350618
        4 0  |   .1260491   .0344573     3.66   0.000     .0585139    .1935842
        4 1  |   .0206457   .1464766     0.14   0.888    -.2664431    .3077346
        5 0  |   .1271709   .0345494     3.68   0.000     .0594553    .1948865
        5 1  |   .0289107   .1311968     0.22   0.826    -.2282302    .2860517
        6 0  |   .1282928   .0346446     3.70   0.000     .0603906    .1961949
        6 1  |   .0371757   .1199028     0.31   0.757    -.1978295     .272181
        7 0  |   .1294146   .0347429     3.72   0.000     .0613198    .1975094
        7 1  |   .0454407   .1137879     0.40   0.690    -.1775795    .2684609
        8 0  |   .1305364   .0348443     3.75   0.000     .0622429      .19883
        8 1  |   .0537057   .1136907     0.47   0.637     -.169124    .2765354
        9 0  |   .1316583   .0349487     3.77   0.000       .06316    .2001565
        9 1  |   .0619707   .1196259     0.52   0.604    -.1724918    .2964332
       10 0  |   .1327801   .0350562     3.79   0.000     .0640712     .201489
       10 1  |   .0702356   .1307748     0.54   0.591    -.1860782    .3265495
       11 0  |   .1339019   .0351667     3.81   0.000     .0649765    .2028274
       11 1  |   .0785006   .1459473     0.54   0.591    -.2075508    .3645521
       12 0  |   .1350238   .0352801     3.83   0.000      .065876    .2041716
       12 1  |   .0867656   .1640308     0.53   0.597    -.2347288      .40826
       13 0  |   .1361456   .0353965     3.85   0.000     .0667697    .2055216
       13 1  |   .0950306   .1841696     0.52   0.606    -.2659353    .4559965
       14 0  |   .1372675   .0355159     3.86   0.000     .0676576    .2068773
       14 1  |   .1032956   .2057613     0.50   0.616    -.2999892    .5065803
       15 0  |   .1383893   .0356381     3.88   0.000       .06854    .2082386
       15 1  |   .1115606   .2283941     0.49   0.625    -.3360837    .5592048
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llgrowthpeacea inc1

. graph export dyads_llgrowthpeaceaFE.png, replace 
file dyads_llgrowthpeaceaFE.png written in PNG format

. 
. 
. margins inc1, at (llshrinkpeaceb = $RANGE llareaa=6.2 $PARAMS)

Predictive margins                                   Number of obs = 3,293,989
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  llshrinkpeaceb =   0
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
2._at:  llshrinkpeaceb =   1
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
3._at:  llshrinkpeaceb =   2
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
4._at:  llshrinkpeaceb =   3
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
5._at:  llshrinkpeaceb =   4
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
6._at:  llshrinkpeaceb =   5
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
7._at:  llshrinkpeaceb =   6
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
8._at:  llshrinkpeaceb =   7
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
9._at:  llshrinkpeaceb =   8
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
10._at: llshrinkpeaceb =   9
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
11._at: llshrinkpeaceb =  10
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
12._at: llshrinkpeaceb =  11
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
13._at: llshrinkpeaceb =  12
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
14._at: llshrinkpeaceb =  13
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3
15._at: llshrinkpeaceb =  14
        llareaa        = 6.2
        llareab        = 6.3
        lldist         = 5.3
        lneigh         =   1
        lcoastala      =   1
        lcoastalb      =   0
        llagea         = 4.5
        llageb         = 4.5
        llnumneighsa   =   2
        llnumneighsb   =   2
        llelevsda      = 3.3
        llelevsdb      = 3.3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    _at#inc1 |
        1 0  |   .1241865   .0343426     3.62   0.000     .0568762    .1914969
        1 1  |   -.005607   .1769002    -0.03   0.975     -.352325    .3411111
        2 0  |     .12459   .0343499     3.63   0.000     .0572655    .1919146
        2 1  |   .0066834   .1700674     0.04   0.969    -.3266426    .3400093
        3 0  |   .1249936   .0343602     3.64   0.000     .0576489    .1923382
        3 1  |   .0189737   .1648327     0.12   0.908    -.3040924    .3420399
        4 0  |   .1253971   .0343735     3.65   0.000     .0580263    .1927678
        4 1  |   .0312641   .1613518     0.19   0.846    -.2849796    .3475077
        5 0  |   .1258006   .0343898     3.66   0.000     .0583978    .1932034
        5 1  |   .0435544   .1597392     0.27   0.785    -.2695287    .3566376
        6 0  |   .1262041   .0344092     3.67   0.000     .0587633    .1936449
        6 1  |   .0558448   .1600516     0.35   0.727    -.2578506    .3695402
        7 0  |   .1266076   .0344316     3.68   0.000      .059123    .1940923
        7 1  |   .0681351   .1622778     0.42   0.675    -.2499235    .3861938
        8 0  |   .1270111    .034457     3.69   0.000     .0594767    .1945456
        8 1  |   .0804255   .1663409     0.48   0.629    -.2455968    .4064478
        9 0  |   .1274146   .0344854     3.69   0.000     .0598245    .1950048
        9 1  |   .0927158    .172111     0.54   0.590    -.2446155    .4300472
       10 0  |   .1278181   .0345168     3.70   0.000     .0601664    .1954699
       10 1  |   .1050062   .1794234     0.59   0.558    -.2466572    .4566696
       11 0  |   .1282217   .0345512     3.71   0.000     .0605025    .1959408
       11 1  |   .1172966   .1880983     0.62   0.533    -.2513694    .4859625
       12 0  |   .1286252   .0345886     3.72   0.000     .0608327    .1964176
       12 1  |   .1295869   .1979567     0.65   0.513    -.2584011     .517575
       13 0  |   .1290287    .034629     3.73   0.000     .0611571    .1969003
       13 1  |   .1418773   .2088311     0.68   0.497    -.2674241    .5511786
       14 0  |   .1294322   .0346723     3.73   0.000     .0614757    .1973887
       14 1  |   .1541676   .2205711     0.70   0.485    -.2781439    .5864791
       15 0  |   .1298357   .0347186     3.74   0.000     .0617884     .197883
       15 1  |    .166458   .2330461     0.71   0.475    -.2903041      .62322
------------------------------------------------------------------------------

. marginsplot, xlab$RANGE recast(line) recastci(rarea) $PLOTOPTS

Variables that uniquely identify margins: llshrinkpeaceb inc1

. graph export dyads_llshrinkoeacebFE.png, replace 
file dyads_llshrinkoeacebFE.png written in PNG format

. 
. 
. 
. 
. 
. 
end of do-file

. 
. 
. *****************************************************************************
> ***
. ** DATA PREP AND ANALYSES: ABRAMSONMAX1400
. *****************************************************************************
> ***
. 
. ** Overwrite relevant paths
. global INPUTDIR "."

. global INPUTFILE "Abramsonmax1400Clipped.csv"

. global INPUTFILED "Abramsonmax1400ClippedDyadic.csv"

. global INTERMEDIATEDIR "IntermediateFiles1400"

. global OUTPUTDIR "Output1400/"

. global FIRSTYEAR "1400"

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. capture mkdir $INTERMEDIATEDIR

. capture mkdir $OUTPUTDIR

. 
. ** Data prep: State-level data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "data_prep1.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: data_prep1.do
. ** First data preparation file for state-level data
. ** Required file paths set in runall.do
. *****************************************************************************
> ***
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INPUTDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. 
. insheet using $INPUTFILE, clear
(157 vars, 19,843 obs)

. 
. drop if id == .
(0 observations deleted)

. drop if year == .
(0 observations deleted)

. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1400 to 1790, but with gaps
         Delta: 1 unit

. sort id year

. 
. // State-level war variable
. gen inc1 = .
(19,843 missing values generated)

. replace inc1 = 0 if incidencebrecke==0
(17,653 real changes made)

. replace inc1 = 1 if incidencebrecke>0 & incidencebrecke!=.
(1,381 real changes made)

. 
. // Wars during entire lifespan
. bys id: egen sumwaryears = sum(inc1)

. bys id: egen sumyears = sum(1)

. gen relwaryears = sumwaryears/sumyears

. 
. // Cumulative war years 
. bysort id (year): gen waryears = sum(inc1)

. gen lwaryears = l5.waryears
(558 missing values generated)

. 
. // State birth and death variables
. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1400 to 1790, but with gaps
         Delta: 1 unit

. 
. bys id: egen maxyear = max(year)

. bys id: egen minyear = min(year)

. 
. gen birth = 0

. replace birth = 1 if id!=. & l5.id==. 
(558 real changes made)

. gen firstbirth = 0

. replace firstbirth = 1 if birth==1 & year==minyear
(468 real changes made)

. 
. gen death = 0

. replace death = 1 if id!=. & f5.id==. & year<1790
(341 real changes made)

. gen finaldeath = 0

. replace finaldeath = 1 if year == maxyear & year<1790
(251 real changes made)

. 
. // Death history variables (not used)
. bysort id (year): gen deaths = sum(death)

. gen deaths1 = 0

. replace deaths1 = 1 if deaths > 0 & deaths != .
(1,629 real changes made)

. 
. // Duration dependence var
. btscs death year id, gen(lifeyears) nspline(3)

. rename _spline1  spline1

. rename _spline2  spline2

. rename _spline3  spline3

. 
. // log and lag of state size (area) and war variable
. gen lnarea = log(area)
(811 missing values generated)

. gen llarea = l5.lnarea
(1,026 missing values generated)

. gen linc1 = l5.inc1
(1,024 missing values generated)

. 
. // State age
. bys id (year): gen age = sum(5)

. gen llage = log(l5.age+5)
(558 missing values generated)

. 
. // Prepare cumulative variables at state level
. replace growthwarbreckearea = 0 if growthwarbreckearea == .
(17,413 real changes made)

. replace growthpeacebreckearea = 0 if growthpeacebreckearea == .
(1,068 real changes made)

. 
. gen lwargrowth = log(growthwarbreckearea + 1)

. gen lpeacegrowth = log(growthpeacebreckearea + 1)

. 
. gen llwargrowth = log(l5.growthwarbreckearea + 1)
(558 missing values generated)

. gen llpeacegrowth = log(l5.growthpeacebreckearea + 1)
(558 missing values generated)

. 
. gen llgrowth = log(l5.growthwarbreckearea + l5.growthpeacebreckearea + 1)
(558 missing values generated)

. 
. replace shrinkwarbreckearea = 0 if shrinkwarbreckearea == .
(17,459 real changes made)

. replace shrinkpeacebreckearea = 0 if shrinkpeacebreckearea == .
(1,514 real changes made)

. 
. gen lwarshrink = log(shrinkwarbreckearea + 1)

. gen lpeaceshrink = log(shrinkpeacebreckearea + 1)

. 
. gen llwarshrink = log(l5.shrinkwarbreckearea + 1)
(558 missing values generated)

. gen llpeaceshrink = log(l5.shrinkpeacebreckearea + 1)
(558 missing values generated)

. 
. gen llshrink = log(l5.shrinkwarbreckearea + shrinkpeacebreckearea + 1)
(558 missing values generated)

. 
. gen netwargrowth = growthwarbreckearea - shrinkwarbreckearea

. gen netpeacegrowth = growthpeacebreckearea - shrinkpeacebreckearea

. 
. 
. // Variations on gain/loss dep. variables (not all used)
. 
. replace gainarea = 0 if gainarea == .
(809 real changes made)

. replace lossarea = 0 if lossarea == .
(1,024 real changes made)

. 
. gen netgain = gainarea - lossarea

. 
. gen gain = netgain

. replace gain = 0 if netgain<0 & netgain!=.
(3,017 real changes made)

. 
. gen loss = 0

. replace loss = abs(netgain) if netgain<0 & netgain!=.
(3,017 real changes made)

.  
. gen loss_nd = loss

. replace loss_nd = . if death==1
(341 real changes made, 341 to missing)

. 
. gen lngain = log(gain + 1)

. gen lnloss = log(loss + 1)

. gen lnloss_nd = log(loss_nd + 1)
(341 missing values generated)

. 
. gen rloss = 0

. replace rloss = loss/l5.area
(4,043 real changes made, 1,026 to missing)

. 
. gen rgain = 0

. replace rgain = gain/l5.area
(3,682 real changes made, 1,026 to missing)

. 
. gen lnrloss = log(rloss+1)
(1,026 missing values generated)

. gen lnrgain = log(rgain+1)
(1,026 missing values generated)

. 
. gen rloss_nd = .
(19,843 missing values generated)

. replace rloss_nd = loss_nd/l5.area
(18,477 real changes made)

. gen lnrloss_nd = log(rloss_nd + 1)
(1,366 missing values generated)

. 
. gen gain1 = 0 

. replace gain1 = 1 if netgain > 0 & netgain!=.
(3,360 real changes made)

. 
. gen loss1 = 0

. replace loss1 = 1 if loss > 0 & loss!=.
(3,017 real changes made)

. 
. gen loss_nd1 = loss_nd
(341 missing values generated)

. replace loss_nd1 = 1 if loss_nd>0 
(3,018 real changes made)

. 
. 
. 
. 
. // Duration variables for state-level models
. 
. btscs gain1 year id, gen(nogainyear) nspline(3)

. rename _spline1  ngspline1

. rename _spline2  ngspline2

. rename _spline3  ngspline3

. 
. btscs loss1 year id, gen(nolossyear) nspline(3)

. rename _spline1  nlspline1

. rename _spline2  nlspline2

. rename _spline3  nlspline3

. 
. gen event = gain1

. replace event = 1 if loss1 == 1
(3,017 real changes made)

. 
. btscs event year id, gen(noeventyear) nspline(3)

. rename _spline1  evspline1

. rename _spline2  evspline2

. rename _spline3  evspline3

. 
. 
. // Urbanization variables and city state dummies (the latter not used)
. 
. gen urban = populationurban/population
(2,181 missing values generated)

. gen lurban = l5.urban
(2,378 missing values generated)

. gen citystate = .
(19,843 missing values generated)

. replace citystate = 0 if urban<=0.4 & llarea<8
(11,951 real changes made)

. replace citystate = 1 if urban>0.4 & llarea<8
(2,861 real changes made)

. 
. 
. // European centrality measures for state location
. 
. gen llcentraldist = log(l5.systemcenterdistancecentroid+1)
(1,026 missing values generated)

. by id (year), sort: egen lmedcentraldist = median(l5.systemcenterdistancecent
> roid)
(8 missing values generated)

. gen lcentral = 0

. replace lcentral = 1 if l5.systemcenterdistancecentroid <= lmedcentraldist
(9,523 real changes made)

. 
. 
. // Paritioning of sample into states above and below median size
. 
. bys year: egen medarea = median(lnarea) 

. gen abovemed = .
(19,843 missing values generated)

. replace abovemed = 1 if lnarea >= medarea
(10,348 real changes made)

. replace abovemed = 0 if lnarea < medarea
(9,495 real changes made)

. 
. 
. // Save intermeidate result for further processing in data_prep_dyadic and da
> ta_prep2
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. sort id year

. save "statedata_intermediate.dta", replace 
file statedata_intermediate.dta saved

. 
end of do-file

. 
. ** Data prep: Dyadic data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "data_prep_dyadic.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: data_prep_dyadic.do
. ** Data preparation file for dyad-level data
. ** Required file paths set in runall.do 
. ** (to be run after data_prep1 but before data_prep2)
. *****************************************************************************
> ***
. 
. 
. // Should be run from runall.do which contains all relevant label definitions
>  for files and directories
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INPUTDIR  
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. 
. insheet using $INPUTFILED, clear
(45 vars, 4,967,442 obs)

. 
. // Define dyad identity codes
. gen idd = ida*1000 + idb

. gen idd2 = idd

. replace idd2 = idb * 1000 + ida if idb!=. & idb < ida
(2,483,721 real changes made)

.  
. sort idd year

. 
. // Main dyadic geography variables
. gen ldist = log(mindistance+1)
(378,804 missing values generated)

. gen neigh = 0

. replace neigh = 1 if mindistance<10
(156,829 real changes made)

. 
. 
. // Merge in state level data for State A
. gen id = ida

. sort id year

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. merge m:1 id year using statedata_intermediate

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         4,967,442  (_merge==3)
    -----------------------------------------

.  drop _merge

. gen areaa = area
(188,885 missing values generated)

. gen popa = population
(532,522 missing values generated)

. gen lareaa = log(areaa)
(189,423 missing values generated)

. gen lpopa = log(popa)
(532,522 missing values generated)

. gen growthwara = growthwarbreckearea

. gen growthpeacea = growthpeacebreckearea

. gen shrinkwara = shrinkwarbreckearea

. gen shrinkpeacea = shrinkpeacebreckearea

. 
. replace elevationsd = 0 if elevationsd == .
(532,522 real changes made)

. gen elevsda = elevationsd

. gen deatha = death

. gen agea = age

. gen coastmina = coastmin
(532,522 missing values generated)

. gen lurbana = lurban
(595,781 missing values generated)

. gen llcentraldista = llcentraldist
(257,959 missing values generated)

. gen lcentrala = lcentral

. 
. drop id area population growthwarbreckearea growthpeacebreckearea shrinkwarbr
> eckearea shrinkpeacebreckearea elevationsd /// 
> death age coastmin lurban llcentraldist lcentral

. 
. // Merge in state level data for State B
. gen id = idb

. sort id year

. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. merge m:1 id year using statedata_intermediate

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         4,967,442  (_merge==3)
    -----------------------------------------

.  drop _merge 

. gen areab = area
(188,885 missing values generated)

. gen popb = population
(532,522 missing values generated)

. gen lareab = log(areab)
(189,423 missing values generated)

. gen lpopb = log(popb)
(532,522 missing values generated)

. gen growthwarb = growthwarbreckearea

. gen growthpeaceb = growthpeacebreckearea

. gen shrinkwarb = shrinkwarbreckearea

. gen shrinkpeaceb = shrinkpeacebreckearea

. gen elevsdb = elevationsd
(532,522 missing values generated)

. gen deathb = death

. gen ageb = age

. gen coastminb = coastmin
(532,522 missing values generated)

. gen lurbanb = lurban
(595,781 missing values generated)

. gen llcentraldistb = llcentraldist
(257,959 missing values generated)

. gen lcentralb = lcentral

. 
. drop id area population growthwarbreckearea growthpeacebreckearea shrinkwarbr
> eckearea shrinkpeacebreckearea elevationsd ///
> death age coastmin lurban llcentraldist lcentral

. 
. // Compute cumulative dyadic vars
. // Growth vars
. xtset idd year

Panel variable: idd (unbalanced)
 Time variable: year, 1400 to 1790, but with gaps
         Delta: 1 unit

. replace growthwara = 0 if growthwara == .
(0 real changes made)

. replace growthpeacea = 0 if growthpeacea == .
(0 real changes made)

. replace growthwarb = 0 if growthwarb == .
(0 real changes made)

. replace growthpeaceb = 0 if growthpeaceb == .
(0 real changes made)

. 
. // Shrink vars
. replace shrinkwara = 0 if shrinkwara == .
(0 real changes made)

. replace shrinkpeacea = 0 if shrinkpeacea == .
(0 real changes made)

. replace shrinkwarb = 0 if shrinkwarb == .
(0 real changes made)

. replace shrinkpeaceb = 0 if shrinkpeaceb == .
(0 real changes made)

. 
. gen llgrowthwara = log(l5.growthwara+1)
(218,130 missing values generated)

. gen llgrowthpeacea = log(l5.growthpeacea+1)
(218,130 missing values generated)

. gen llgrowthwarb = log(l5.growthwarb+1)
(218,130 missing values generated)

. gen llgrowthpeaceb = log(l5.growthpeaceb+1)
(218,130 missing values generated)

. gen llshrinkwara = log(l5.shrinkwara+1)
(218,130 missing values generated)

. gen llshrinkpeacea = log(l5.shrinkpeacea+1)
(218,130 missing values generated)

. gen llshrinkwarb = log(l5.shrinkwarb+1)
(218,130 missing values generated)

. gen llshrinkpeaceb = log(l5.shrinkpeaceb+1)
(218,130 missing values generated)

. 
. gen llgrowtha = log(l5.growthwara+l5.growthpeacea+1) 
(218,130 missing values generated)

. gen llshrinkb = log(l5.shrinkwarb+l5.shrinkpeaceb+1)
(218,130 missing values generated)

. 
. // Compute dependent variables
. // Netgain
. replace gainaarea = 0 if gainaarea == .
(438,017 real changes made)

. replace lossaarea = 0 if lossaarea == .
(438,017 real changes made)

. drop netgain

. gen netgain = .
(4,967,442 missing values generated)

. replace netgain = gainaarea - lossaarea
(4,967,442 real changes made)

. gen netgain0 = netgain

. replace netgain0 = 0 if netgain<0 & netgain!=. 
(10,186 real changes made)

. 
. gen netloss0 = abs(netgain)

. replace netloss0 = 0 if netgain>0 & netgain!=. 
(10,186 real changes made)

.  
. // DVs...
. gen lnga = log(netgain0+1)

. gen lnla = log(netloss0+1)

. //gen nga1 = 0
. //replace nga1 = 1 if netgain0 > 100
. 
.  // Revised DV with losses dyad coded as missing
.  
.  gen lnga0 = lnga

.  replace lnga0 = . if netgain < 0 
(10,186 real changes made, 10,186 to missing)

. 
.  
.  gen lnla0 = lnla

.  replace lnla0 = . if netgain > 0 
(10,186 real changes made, 10,186 to missing)

.  
. 
. /////////////////////////////////////////////////
>  
. gen lnga2 = log(abs(netgain)+1)

.  
. gen nga21 = 0

. replace nga21 = 1 if lnga2>0 & lnga2!=.
(20,372 real changes made)

.  
. gen nga2 = abs(netgain)

. 
. // Compute dummy DVs
. 
. // drop nga1
. 
. gen nga1 = 0

. replace nga1 = 1 if netgain > 0 & netgain != .
(10,186 real changes made)

. 
. gen nla1 = 0

. replace nla1 = 1 if netgain < 0 & netgain != .
(10,186 real changes made)

. 
.  drop event

. gen event = 0

. replace event = 1 if nga1==1 | nla1==1 
(20,372 real changes made)

.  drop noeventyear

. btscs  event year idd, gen(noeventyear) nspline(3)

.  drop evspline*

. rename _spline1  evspline1

. rename _spline2  evspline2

. rename _spline3  evspline3

. 
. 
. gen nga10 = nga1

. replace nga10 = . if netgain < 0 & netgain != .
(10,186 real changes made, 10,186 to missing)

. 
. gen nla10 = nla1

. replace nla10 = . if netgain > 0 & netgain != .
(10,186 real changes made, 10,186 to missing)

. 
. 
. 
. ////////////////////////////////////////////
> 
. // Conflict variables
. drop inc1

. gen inc1 = .
(4,967,442 missing values generated)

. replace inc1 = 0 if incidencebrecke == 0 
(4,964,128 real changes made)

. replace inc1 = 1 if incidencebrecke > 0  & incidencebrecke!=.
(3,314 real changes made)

. 
. 
. 
.   
. xtset idd year

Panel variable: idd (unbalanced)
 Time variable: year, 1400 to 1790, but with gaps
         Delta: 1 unit

.  
. // Prepare vars for dyadic analysis
.  gen lneigh = l5.neigh
(218,130 missing values generated)

.  gen lldist = l5.ldist
(432,732 missing values generated)

.  gen llareaa = l5.lareaa
(325,438 missing values generated)

.  gen llareab = l5.lareab
(325,438 missing values generated)

.  
. // Set labels for output
. label variable lnga "log net terr. gain"

. label variable lneigh "neighbors"

. label variable lldist "log distance"

. label variable inc1 "conflict"

. label variable llareaa "log size A"

. label variable llareab "log size B"

. label variable llgrowthwara "log cumul. war gains A"

. label variable llgrowthpeacea "log cumul. peace gains A"

.  
.  
. 
. // Compute various relational measures aggregated to the country level
. // Used as control variables... 
.  
.  bys ida year: egen lnumneighsa = sum(lneigh)

.  gen llnumneighsa = log(lnumneighsa+1)

.  
.  bys idb year: egen lnumneighsb = sum(lneigh)

.  gen llnumneighsb = log(lnumneighsb+1)

. 
. 
.  xtset idd year

Panel variable: idd (unbalanced)
 Time variable: year, 1400 to 1790, but with gaps
         Delta: 1 unit

.  
.  gen llelevsda = log(l5.elevsda+1)
(218,130 missing values generated)

.  gen llelevsdb = log(l5.elevsdb+1)
(658,345 missing values generated)

.  
. 
. 
.  
. 
. 
. gen llr = llareaa/log(l5.areaa + l5.areab)
(432,217 missing values generated)

. gen llrpop = l5.lpopa/log(l5.popa+l5.popb)
(1,060,514 missing values generated)

. gen inc1Xllr = inc1 * llr
(432,217 missing values generated)

. 
. // Save intermediate analysis data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. save dyad_analysis1, replace
(file dyad_analysis1.dta not found)
file dyad_analysis1.dta saved

. // save dyad_analysis1warlag, replace
. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////////////////////////
> // Aggregation to country level
. 
. gen dyad_wargains = inc1*netgain0

. gen dyad_peacegains = (1-inc1)*netgain0

. gen dyad_warlosses = inc1*netloss0

. gen dyad_peacelosses = (1-inc1)*netloss0

. 
. 
. collapse (sum)dyad_wargains dyad_peacegains dyad_warlosses dyad_peacelosses  
> (max) llnumneighsa lnumneighsa, by (ida year) 

. 
. xtset ida year

Panel variable: ida (unbalanced)
 Time variable: year, 1400 to 1790, but with gaps
         Delta: 1 unit

. 
. rename ida id 

. 
. // Save country-level variables that are used in country-level analysis
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. save dyad_cumul.dta, replace
file dyad_cumul.dta saved

. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////////////////////////
> // Reload main analysis data again
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. use dyad_analysis1, clear

. // use dyad_analysis1warlag, clear
. 
. 
. // Merge in country level data for States A and B
. // drop id
. gen id = ida

. merge m:1 id year using dyad_cumul

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         4,967,442  (_merge==3)
    -----------------------------------------

. gen dyad_wargainsa = dyad_wargains

. gen dyad_peacegainsa = dyad_peacegains

. gen dyad_warlossesa = dyad_warlosses

. gen dyad_peacelossesa = dyad_peacelosses

.  drop id _merge dyad_peacegains dyad_warlosses dyad_peacelosses

. 
. 
. replace dyad_wargainsa = 0 if dyad_wargainsa == .
(0 real changes made)

. replace dyad_peacegainsa = 0 if dyad_peacegainsa == .
(0 real changes made)

. replace dyad_warlossesa = 0 if dyad_warlossesa == .
(0 real changes made)

. replace dyad_peacelossesa = 0 if dyad_peacelossesa == .
(0 real changes made)

. 
.  // drop id
. gen id = idb

. merge m:1 id year using dyad_cumul

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                         4,967,442  (_merge==3)
    -----------------------------------------

. gen dyad_wargainsb = dyad_wargains

. gen dyad_peacegainsb = dyad_peacegains

. gen dyad_warlossesb = dyad_warlosses

. gen dyad_peacelossesb = dyad_peacelosses

.  drop id _merge dyad_wargains dyad_peacegains dyad_warlosses dyad_peacelosses

. 
. 
. replace dyad_wargainsb = 0 if dyad_wargainsb == .
(0 real changes made)

. replace dyad_peacegainsb = 0 if dyad_peacegainsb == .
(0 real changes made)

. replace dyad_warlossesb = 0 if dyad_warlossesb == .
(0 real changes made)

. replace dyad_peacelossesb = 0 if dyad_peacelossesb == .
(0 real changes made)

. 
. 
. 
. // Analysis data including onset etc.
. 
. gen onsetinita1 = 0

. replace onsetinita1 = 1 if  onsetinitiatorabrecke > 0 & onsetinitiatorabrecke
>  !=.
(636 real changes made)

. 
. btscs onsetinita1 year idd, gen(pyis) nspline(3)

. rename _spline1  pyispline1

. rename _spline2  pyispline2

. rename _spline3  pyispline3

. 
. 
. 
. gen incinita1 = 0

. replace incinita1 = 1 if inc1==1 & incidenceinitiatorabrecke > 0 & incidencei
> nitiatorabrecke !=.
(1,146 real changes made)

. 
. gen incinitsidea1 = incinita1

. replace incinitsidea1 = 1 if incidencefollowerabrecke > 0 & incidencefollower
> abrecke !=.
(1,700 real changes made)

. 
. gen incattackedb1 = 0

. replace incattackedb1 = 1 if incidencebrecke>0 & incidenceinitiatorbbrecke==0
>  & incidencefollowerbbrecke==0
(1,428 real changes made)

. 
. gen inc1Xgrowthwara = inc1 * llgrowthwara
(218,130 missing values generated)

. gen inc1Xgrowthpeacea = inc1 * llgrowthpeacea
(218,130 missing values generated)

. gen inc1Xshrinkwarb = inc1 * llshrinkwarb
(218,130 missing values generated)

. gen inc1Xshrinkpeaceb = inc1 * llshrinkpeaceb
(218,130 missing values generated)

. 
. 
. gen llagea = log(l5.agea*5+5)
(218,130 missing values generated)

. gen llageb = log(l5.ageb*5+5)
(218,130 missing values generated)

. gen llcoastdista = log(l5.coastmina+1)
(658,345 missing values generated)

. gen llcoastdistb = log(l5.coastminb+1)
(658,345 missing values generated)

. gen lcoastala = 0

. replace lcoastala = 1 if coastmina < 10
(764,912 real changes made)

. gen lcoastalb = 0

. replace lcoastalb = 1 if coastminb < 10
(764,912 real changes made)

. 
. gen lr = l5.areaa/(l5.areaa+l5.areab)
(431,702 missing values generated)

. gen lrwar = l5.growthwara / (l5.growthwara + l5.growthwarb)
(4,345,466 missing values generated)

. gen lrpeace = l5.growthpeacea / (l5.growthpeacea + l5.growthpeaceb)
(2,083,630 missing values generated)

. 
. // Save main analysis data
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. save dyad_analysis2, replace 
file dyad_analysis2.dta saved

. 
. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////////////////////////
> // Again aggregate analysis data to country level
. 
. collapse (max)dyad_* /*(max)lr*nb*/, by (ida year)

. rename ida id

. save cumulneigh, replace
file cumulneigh.dta saved

. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. use dyad_analysis2, clear

. 
.  
.  erase dyad_analysis1.dta

. 
end of do-file

. 
. ** Data prep: State-level data again
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "data_prep2.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: data_prep1.do
. ** Second data preparation file for state-level data
. ** Required file paths set in runall.do
. *****************************************************************************
> ***
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. use "statedata_intermediate.dta", clear 

. 
. 
. merge 1:1 id year using dyad_cumul

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            19,843  (_merge==3)
    -----------------------------------------

. drop _merge

. 
. merge 1:1 id year using cumulneigh

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            19,843  (_merge==3)
    -----------------------------------------

. drop _merge

. 
. 
. ** Remove phantom years
. // "Phantom years are those preceding or succeding the lifespan of a state"
. // They are used to compute size changes etc. but should not be used in analy
> sis
. drop if willborn == "true"
(446 observations deleted)

. drop if hasdied == "true"
(363 observations deleted)

. 
. // Compute new version of death variables
. drop death finaldeath deaths deaths1 lifeyears spline*

. gen death = 0

. replace death = 1 if id!=. & f5.id==. & year<1790
(490 real changes made)

. gen finaldeath = 0

. replace finaldeath = 1 if year == maxyear & year<1790
(0 real changes made)

. 
. // Compute death history variables
. bysort id (year): gen deaths = sum(death)

. gen deaths1 = 0

. replace deaths1 = 1 if deaths > 0 & deaths != .
(3,643 real changes made)

. 
. // Duration dependence for lifespan of state
. btscs death year id, gen(lifeyears) nspline(3)

. rename _spline1  spline1

. rename _spline2  spline2

. rename _spline3  spline3

. 
. 
. // Compute variables for regression analysis
. 
. gen warXsize = inc1*llarea
(706 missing values generated)

. 
. gen warXwargrowth = inc1*llwargrowth
(259 missing values generated)

. 
. gen warXpeacegrowth = inc1*llpeacegrowth
(259 missing values generated)

. 
. gen warXwarshrink = inc1*llwarshrink
(259 missing values generated)

. gen warXpeaceshrink = inc1*llpeaceshrink
(259 missing values generated)

. 
. gen peaceXwargrowth = (1-inc1)*llwargrowth
(259 missing values generated)

. gen peaceXpeacegrowth = (1-inc1)*llpeacegrowth
(259 missing values generated)

. gen peaceXwarshrink = (1-inc1)*llwarshrink
(259 missing values generated)

. gen peaceXpeaceshrink = (1-inc1)*llpeaceshrink
(259 missing values generated)

. 
. 
. gen onsetinit1 = 0 

. replace onsetinit1 = 1 if onsetinitiatorbrecke>0 & onsetinitiatorbrecke!=.
(482 real changes made)

. 
. // compute various duration dep. vars. (not all used)
. btscs onsetinit1 year id, gen(pys) nspline(3)

. rename _spline1  pyspline1

. rename _spline2  pyspline2

. rename _spline3  pyspline3

. 
. gen onsetinitside1 = onsetinit1

. replace onsetinitside1 = 1 if onsetfollowerbrecke == 1
(87 real changes made)

. 
. btscs onsetinitside1 year id, gen(pys2) nspline(3)

. rename _spline1  pys2pline1

. rename _spline2  pys2pline2

. rename _spline3  pys2pline3

. 
. gen incinit1 = 0

. replace incinit1 = 1 if inc1>0 & incidenceinitiatorbrecke > 0 & incidenceinit
> iatorbrecke !=.
(816 real changes made)

. 
. gen incinitside1 = incinit1

. replace incinitside1 = 1 if incidencefollowerbrecke > 0 & incidencefollowerbr
> ecke !=.
(187 real changes made)

. 
. gen attacked1 = 0

. replace attacked1 = 1 if onsetbrecke>0 & onsetinit1==0 & onsetinitside1==0
(283 real changes made)

. 
. btscs attacked1 year id, gen(pyas) nspline(3)

. rename _spline1  pyaspline1

. rename _spline2  pyaspline2

. rename _spline3  pyaspline3

. 
. gen incattacked1 = 0

. replace incattacked1 = 1 if incidencebrecke>0 & incinit1==0 & incinitside1==0
(378 real changes made)

. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////
> // cumulative counters for number of war years
. 
. bys id (year): gen warsum1 = sum(inc1)

. gen lwarsum1 = l5.warsum1
(705 missing values generated)

. gen llwarsum1 = log(lwarsum1+1)
(705 missing values generated)

. bys id (year): gen warsum = sum(incidencebrecke)

. gen lwarsum = l5.warsum
(705 missing values generated)

. gen llwarsum = log(lwarsum+1)
(705 missing values generated)

. 
. bys id (year): gen onsetinitsum = sum(onsetinit1)

. gen lonsetinitsum = l5.onsetinitsum
(705 missing values generated)

. gen llonsetinitsum = log(lonsetinitsum + 1)
(705 missing values generated)

. 
. 
. /////////////////////////////////////////////////////////////////////////////
> //////////////
> /*
> gen lldwin_wargains = log(dwin_wargains+1)
> gen lldwin_warlosses = log(dwin_warlosses+1)
> gen lldwin_peacegains = log(dwin_peacegains+1)
> gen lldwin_peacelosses = log(dwin_peacelosses+1)
> 
> gen dwin_netwargains = dwin_wargains-dwin_warlosses
> replace dwin_netwargains = 0 if dwin_netwargains<0
> gen lldwin_netwargains = log(dwin_netwargains+1)
> gen dwin_netwarlosses = dwin_warlosses-dwin_wargains
> replace dwin_netwarlosses = 0 if dwin_netwarlosses<0
> gen lldwin_netwarlosses = log(dwin_netwarlosses+1)
> 
> gen dwin_netpeacegains = dwin_peacegains-dwin_peacelosses
> replace dwin_netpeacegains = 0 if dwin_netpeacegains<0
> gen lldwin_netpeacegains = log(dwin_netpeacegains+1)
> gen dwin_netpeacelosses = dwin_peacelosses-dwin_peacegains
> replace dwin_netpeacelosses = 0 if dwin_netpeacelosses<0
> gen lldwin_netpeacelosses = log(dwin_netpeacelosses+1)
> 
> 
> bys year: egen warring = sum(inc1)
> */
. 
. xtset id year

Panel variable: id (unbalanced)
 Time variable: year, 1400 to 1790, but with gaps
         Delta: 1 unit

. gen llcoastdist = log(l5.coastmin + 1)
(2,038 missing values generated)

. gen lcoastal = 0

. replace lcoastal = 1 if l5.coastmin < 10
(2,882 real changes made)

. 
. *gen lwarring = l5.warring
. *gen lsharewarring = (l5.warring/l5.n)
. replace elevationsd = 0 if elevationsd == . 
(1,372 real changes made)

. 
. gen llelevsd = log(1 + l5.elevationsd)
(705 missing values generated)

. 
. 
. // All main datasets have been prepared for analysis
. // We are now ready to run analysis do-files
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. save "statedata.dta", replace 
file statedata.dta saved

. 
end of do-file

. 
. ** Analysis: State-level
. ** cd $ROOT
. ** do "analysis_states.do"
. 
. ** Analysis: Dyadic level (Tables A5 and A11)
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. do "analysis_dyads_1400.do"

. *****************************************************************************
> ***
. ** Cederman, Galano, Girardin and Schvitz. War Did Make States.
. ** Article prepared for International Organization
. ** June 20, 2022
. **
. ** Stata do-file: analysis_dyads.do
. ** Robustness analysis: Script for dyadic analysis with data from 1400
. ** Required file paths set in runall.do
. *****************************************************************************
> ***
. 
. 
. cd $ROOT
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis

. cd $INTERMEDIATEDIR
/Users/luc/java/nastacdb/NASTACdb/TillyProject/analysis/IntermediateFiles1400

. use dyad_analysis2, clear

.  
. gen peaceXgrowthwara = (1-inc1)*llgrowthwara
(218,130 missing values generated)

. gen peaceXgrowthpeacea = (1-inc1)*llgrowthpeacea
(218,130 missing values generated)

. gen peaceXshrinkwarb = (1-inc1)*llshrinkwarb
(218,130 missing values generated)

. gen peaceXshrinkpeaceb = (1-inc1)*llshrinkpeaceb
(218,130 missing values generated)

. 
. gen lrwara = l5.growthwara/(l5.llareaa)
(539,268 missing values generated)

. gen lrXlr = lr * lr
(431,702 missing values generated)

. 
. gen peaceXllr = (1-inc1)*llr
(432,217 missing values generated)

. gen initXllr = incinita1 * llr
(432,217 missing values generated)

. 
. replace llelevsda = 0 if llelevsda == .
(218,130 real changes made)

. replace llelevsdb = 0 if llelevsdb == .
(658,345 real changes made)

. 
. 
. label variable lnga "log terr. gain A"

. label variable lneigh "neighbors AB"

. label variable llnumneighsa "\\# neighbors A"

. label variable llnumneighsb "\\# neighbors B"

. label variable lldist "log distance AB"

. label variable inc1 "war AB"

. label variable lr "rel. size A/AB"

. label variable lrXlr "rel. size ^2"

. label variable llr "rel. log size A/AB"

. label variable inc1Xllr "war X rel. log size"

. label variable peaceXllr "peace X rel. log size"

. label variable llareaa "log size A"

. label variable lcoastala "Coastal access A"

. label variable lcoastalb "Coastal access B"

. label variable llagea "log age A"

. label variable llageb "log age B"

. label variable llareab "log size B"

. label variable llelevsda "log elev. SD A"

. label variable llelevsdb "log elev SD B"

. 
. label variable lurbana "urban share A"

. label variable lurbanb "urban share B"

. 
. label variable lcentrala "core (A)"

. label variable lcentralb "core (B)"

. 
. 
. label variable llgrowthwara "cumul. war gains A"

. label variable llgrowthpeacea "cumul. peace gains A"

. label variable inc1Xgrowthwara "war X war gains A"

. label variable inc1Xgrowthpeacea "war X peace gains A"

. 
. label variable peaceXgrowthwara "peace X war gains A"

. label variable peaceXgrowthpeacea "peace X peace gains A"

. 
. 
. label variable llshrinkwarb "cumul. war losses B"

. label variable llshrinkpeaceb "cumul. peace losses B"

. label variable inc1Xshrinkwarb "war X war losses B"

. label variable inc1Xshrinkpeaceb "war X peace losses B"

. 
. label variable peaceXshrinkwarb "peace X war losses B"

. label variable peaceXshrinkpeaceb "peace X peace losses B"

. 
. label variable lrgrowthwarab "cumul. war gains A/B"
variable lrgrowthwarab not found
r(111);

end of do-file
r(111);

end of do-file
r(111);
